Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
7
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
1908b791
Commit
1908b791
authored
1 year ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
added pandas index support for setFlags
parent
de1b0872
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!823
pandas index support for setFlags
Pipeline
#203875
passed with stages
in 4 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/funcs/flagtools.py
+2
-2
2 additions, 2 deletions
saqc/funcs/flagtools.py
with
2 additions
and
2 deletions
saqc/funcs/flagtools.py
+
2
−
2
View file @
1908b791
...
...
@@ -108,7 +108,7 @@ class FlagtoolsMixin:
data :
Determines which timestamps to set flags at, depending on the passed type:
* 1-d `array` or `List` of timestamps: flag `field` with `flag` at every timestamp in `f_data`
* 1-d `array` or `List` of timestamps
or `pandas.Index`
: flag `field` with `flag` at every timestamp in `f_data`
* 2-d `array` or List of tuples: for all elements `t[k]` out of f_data:
flag `field` with `flag` at every timestamp in between `t[k][0]` and `t[k][1]`
* pd.Series: flag `field` with `flag` in between any index and data value of the passed series
...
...
@@ -123,7 +123,7 @@ class FlagtoolsMixin:
to_flag
=
pd
.
Series
(
False
,
index
=
self
.
_data
[
field
].
index
)
# check if f_data is meant to denote timestamps:
if
(
isinstance
(
data
,
(
list
,
np
.
ndarray
)))
and
not
isinstance
(
if
(
isinstance
(
data
,
(
list
,
np
.
ndarray
,
pd
.
Index
)))
and
not
isinstance
(
data
[
0
],
(
tuple
,
np
.
ndarray
)
):
set_idx
=
pd
.
DatetimeIndex
(
data
).
intersection
(
to_flag
.
index
)
...
...
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