Skip to content
Snippets Groups Projects
Commit 93e3ca67 authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

minor nicer

parent 81889e8b
No related branches found
No related tags found
3 merge requests!193Release 1.4,!188Release 1.4,!85Seasonal and custom data masking
Pipeline #6107 passed with stage
in 6 minutes and 7 seconds
......@@ -273,13 +273,15 @@ def modelling_mask(data, field, flagger, mode, loc_var=None, season_start=None,
else:
overlap = True
def _selector(x, overlap=overlap, start=season_start, end=season_end):
if not overlap:
if not overlap:
def _selector(x, start=season_start, end=season_end):
x[_composeStamp(x.index, start):_composeStamp(x.index, end)] = True
else:
return x
else:
def _selector(x, start=season_start, end=season_end):
x[:_composeStamp(x.index, start)] = True
x[_composeStamp(x.index, end):] = True
return x
return x
freq = '1' + 'mmmhhhdddMMMYYY'[len(season_start)]
seasonal_mask = mask.groupby(pd.Grouper(freq=freq)).transform(_selector)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment