added label mechanics to isFlagged / implemented lebelMechanics test
Added label keyword mechanics to isFlagged
(as discussed on the phone with @schaefed).
- Implementation is quite non-invasive.
- Biggest change: since history informations must be known to
isFlagged
- global, the histories get passed on toexecGeneric
(as opposed to only getting squeezed flags columns) - added test
Test like so:
dat = pd.DataFrame({'data1': [1, 1, 5, 2, 1], 'data2': [1, 1, 2, 3, 4]}, index=pd.date_range('2000', '2005', periods=5))
qc = SaQC(dat)
qc = qc.flagRange('data1', max=4, label='out of range')
qc = qc.flagRange('data1', max=0, label='out of range2')
qc = qc.flagGeneric('data1', target='data2',func=lambda x: isflagged(x, 'out of range'))
Expected result is, that data2
only is flagged where first call to flagRange
triggered flagging for data1
.
closes #336 (closed)
Edited by Peter Lünenschloß
Merge request reports
Activity
Filter activity
requested review from @schaefed
assigned to @luenensc
added 7 commits
-
69f404d4...90af9e8a - 6 commits from branch
develop
- 57c1bc87 - Merge branch 'develop' into Make_isFlagged_testfunction_sensitive
-
69f404d4...90af9e8a - 6 commits from branch
- Resolved by David Schäfer
- Resolved by Peter Lünenschloß
- Resolved by Peter Lünenschloß
one more thing to discuss briefly is if we want to return the first or the last occurrence of
label
in the history..from my guts, i vote for the last
- Resolved by David Schäfer
- Resolved by David Schäfer
- Resolved by Peter Lünenschloß
added 1 commit
- 68488530 - made it so that last occurence of label is selected
Please register or sign in to reply