Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
36
Issue boards
Milestones
Wiki
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rdm-software
SaQC
Commits
93e3ca67
Commit
93e3ca67
authored
4 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
minor nicer
parent
81889e8b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!193
Release 1.4
,
!188
Release 1.4
,
!85
Seasonal and custom data masking
Pipeline
#6107
passed with stage
in 6 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/funcs/data_modelling.py
+6
-4
6 additions, 4 deletions
saqc/funcs/data_modelling.py
with
6 additions
and
4 deletions
saqc/funcs/data_modelling.py
+
6
−
4
View file @
93e3ca67
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment