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
9
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
0d9608be
Commit
0d9608be
authored
5 years ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
do not assign not-given variable names implicitly
parent
fe39438a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
core.py
+5
-6
5 additions, 6 deletions
core.py
with
8 additions
and
9 deletions
README.md
+
3
−
3
View file @
0d9608be
...
@@ -30,9 +30,9 @@
...
@@ -30,9 +30,9 @@
-
`flag_values`
:
-
`flag_values`
:
+
Number
+
Number
+
if a value is flagged, so are the next n previously unflagged values
+
if a value is flagged, so are the next n previously unflagged values
-
`assign
_to
`
:
-
`assign`
:
+
String
+
boolean
+
Assign the test result to a new column
s given as a value to assign
+
Assign the test result to a new column
### Predefined Tests
### Predefined Tests
| name | required parameters | optional parameters | description |
| name | required parameters | optional parameters | description |
...
...
This diff is collapsed.
Click to expand it.
core.py
+
5
−
6
View file @
0d9608be
...
@@ -16,7 +16,7 @@ class FlagParams:
...
@@ -16,7 +16,7 @@ class FlagParams:
FLAG
=
"
flag
"
FLAG
=
"
flag
"
PERIODE
=
"
flag_period
"
PERIODE
=
"
flag_period
"
VALUES
=
"
flag_values
"
VALUES
=
"
flag_values
"
ASSIGN
=
"
assign
_to
"
ASSIGN
=
"
assign
"
def
_inferFrequency
(
data
):
def
_inferFrequency
(
data
):
...
@@ -74,14 +74,13 @@ def runner(meta, flagger, data, flags=None, nodata=np.nan):
...
@@ -74,14 +74,13 @@ def runner(meta, flagger, data, flags=None, nodata=np.nan):
if
pd
.
isnull
(
flag_test
):
if
pd
.
isnull
(
flag_test
):
continue
continue
varname
,
start_date
,
end_date
=
configrow
[
fields
]
func_name
,
flag_params
=
parseFlag
(
flag_test
)
func_name
,
flag_params
=
parseFlag
(
flag_test
)
assign_to
=
flag_params
.
get
(
FlagParams
.
ASSIGN
)
if
flag_params
.
get
(
FlagParams
.
ASSIGN
):
if
assign_to
:
dummy
=
pd
.
DataFrame
(
index
=
data
.
index
,
columns
=
[
varname
])
dummy
=
pd
.
DataFrame
(
index
=
data
.
index
,
columns
=
[
assign_to
])
flags
[
varname
]
=
flagger
.
emptyFlags
(
dummy
)
flags
=
flags
.
join
(
flagger
.
emptyFlags
(
dummy
))
varname
,
start_date
,
end_date
=
configrow
[
fields
]
if
varname
not
in
data
:
if
varname
not
in
data
:
continue
continue
...
...
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