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
34ed5e38
Commit
34ed5e38
authored
2 years ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
Revert "interpol-options"
parent
0699367a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!685
Release 2.4
,
!684
Release 2.4
,
!646
Revert "interpol-options"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+0
-1
0 additions, 1 deletion
CHANGELOG.md
saqc/funcs/interpolation.py
+1
-1
1 addition, 1 deletion
saqc/funcs/interpolation.py
saqc/funcs/resampling.py
+6
-24
6 additions, 24 deletions
saqc/funcs/resampling.py
with
7 additions
and
26 deletions
CHANGELOG.md
+
0
−
1
View file @
34ed5e38
...
...
@@ -11,7 +11,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
### Added
-
Methods
`logicalAnd`
and
`logicalOr`
-
`Flags`
supports slicing and column selection with
`list`
or a
`pd.Index`
.
-
added option
`limit`
to functions
`interpolate`
and
`linear`
.
### Changed
### Removed
### Fixed
...
...
This diff is collapsed.
Click to expand it.
saqc/funcs/interpolation.py
+
1
−
1
View file @
34ed5e38
...
...
@@ -287,7 +287,7 @@ class InterpolationMixin:
freq
:
str
,
method
:
_SUPPORTED_METHODS
,
order
:
int
=
2
,
limit
:
int
|
str
|
None
=
2
,
limit
:
int
|
None
=
2
,
extrapolate
:
Literal
[
"
forward
"
,
"
backward
"
,
"
both
"
]
=
None
,
**
kwargs
,
)
->
"
SaQC
"
:
...
...
This diff is collapsed.
Click to expand it.
saqc/funcs/resampling.py
+
6
−
24
View file @
34ed5e38
...
...
@@ -40,7 +40,6 @@ class ResamplingMixin:
self
:
"
SaQC
"
,
field
:
str
,
freq
:
str
,
limit
:
int
|
str
|
None
=
None
,
**
kwargs
,
)
->
"
SaQC
"
:
"""
...
...
@@ -63,30 +62,21 @@ class ResamplingMixin:
freq : str
An offset string. The frequency of the grid you want to interpolate your data at.
limit : int or str, optional
Upper limit of missing values (with respect to `freq`) to fill. The limit can either be expressed
as the number of consecutive missing values (integer) or temporal extension of the gaps to be filled
(Offset String).
If `None` is passed, no Limit is set.
Returns
-------
saqc.SaQC
"""
reserved
=
[
"
method
"
,
"
order
"
,
"
downgrade
"
]
reserved
=
[
"
method
"
,
"
order
"
,
"
limit
"
,
"
downgrade
"
]
kwargs
=
filterKwargs
(
kwargs
,
reserved
)
return
self
.
interpolateIndex
(
field
=
field
,
freq
=
freq
,
method
=
"
time
"
,
limit
=
limit
,
**
kwargs
)
return
self
.
interpolateIndex
(
field
,
freq
,
"
time
"
,
**
kwargs
)
@register
(
mask
=
[
"
field
"
],
demask
=
[],
squeeze
=
[])
def
interpolate
(
self
:
"
SaQC
"
,
field
:
str
,
freq
:
str
,
method
:
_SUPPORTED_METHODS
=
"
linear
"
,
method
:
_SUPPORTED_METHODS
,
order
:
int
=
1
,
limit
:
int
|
str
|
None
=
None
,
**
kwargs
,
)
->
"
SaQC
"
:
"""
...
...
@@ -116,28 +106,20 @@ class ResamplingMixin:
An offset string. The frequency of the grid you want to interpolate your data at.
method : {
"
linear
"
,
"
time
"
,
"
nearest
"
,
"
zero
"
,
"
slinear
"
,
"
quadratic
"
,
"
cubic
"
,
"
spline
"
,
"
barycentric
"
,
"
polynomial
"
,
"
krogh
"
,
"
piecewise_polynomial
"
,
"
spline
"
,
"
pchip
"
,
"
akima
"
}
, default
"
linear
"
"
polynomial
"
,
"
krogh
"
,
"
piecewise_polynomial
"
,
"
spline
"
,
"
pchip
"
,
"
akima
"
}
The interpolation method you want to apply.
order : int, default 1
If your selected interpolation method can be performed at different *orders* - here you pass the desired
order.
limit : int or str, optional
Upper limit of missing values (with respect to `freq`) to fill. The limit can either be expressed
as the number of consecutive missing values (integer) or temporal extension of the gaps to be filled
(Offset String).
If `None` is passed, no Limit is set.
Returns
-------
saqc.SaQC
"""
reserved
=
[
"
downgrade
"
]
reserved
=
[
"
limit
"
,
"
downgrade
"
]
kwargs
=
filterKwargs
(
kwargs
,
reserved
)
return
self
.
interpolateIndex
(
field
=
field
,
freq
=
freq
,
method
=
method
,
limit
=
limit
,
order
=
order
,
**
kwargs
)
return
self
.
interpolateIndex
(
field
,
freq
,
method
=
method
,
order
=
order
,
**
kwargs
)
@register
(
mask
=
[
"
field
"
],
demask
=
[],
squeeze
=
[])
def
shift
(
...
...
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