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
0ae8552c
Commit
0ae8552c
authored
1 year ago
by
David Schäfer
Browse files
Options
Downloads
Plain Diff
Merge branch 'cow' into 'develop'
enable pandas copy_on_write See merge request
!796
parents
da4edc76
8a7a4227
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!796
enable pandas copy_on_write
Pipeline
#203912
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
saqc/core/core.py
+2
-2
2 additions, 2 deletions
saqc/core/core.py
tests/core/test_flags.py
+1
-1
1 addition, 1 deletion
tests/core/test_flags.py
tests/core/test_history.py
+1
-1
1 addition, 1 deletion
tests/core/test_history.py
with
4 additions
and
4 deletions
saqc/core/core.py
+
2
−
2
View file @
0ae8552c
...
@@ -12,7 +12,7 @@ import warnings
...
@@ -12,7 +12,7 @@ import warnings
from
copy
import
copy
as
shallowcopy
from
copy
import
copy
as
shallowcopy
from
copy
import
deepcopy
from
copy
import
deepcopy
from
functools
import
partial
from
functools
import
partial
from
typing
import
Any
,
Hashable
,
Iterable
,
MutableMapping
,
overload
from
typing
import
Any
,
Hashable
,
Iterable
,
MutableMapping
import
numpy
as
np
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
...
@@ -32,7 +32,7 @@ from saqc.funcs import FunctionsMixin
...
@@ -32,7 +32,7 @@ from saqc.funcs import FunctionsMixin
# warnings
# warnings
pd
.
set_option
(
"
mode.chained_assignment
"
,
"
warn
"
)
pd
.
set_option
(
"
mode.chained_assignment
"
,
"
warn
"
)
pd
.
option
s
.
mode
.
copy_on_write
=
False
pd
.
set_
option
(
"
mode.copy_on_write
"
,
True
)
np
.
seterr
(
invalid
=
"
ignore
"
)
np
.
seterr
(
invalid
=
"
ignore
"
)
...
...
This diff is collapsed.
Click to expand it.
tests/core/test_flags.py
+
1
−
1
View file @
0ae8552c
...
@@ -122,7 +122,7 @@ def test_copy(data: Union[pd.DataFrame, DictOfSeries, Dict[str, pd.Series]]):
...
@@ -122,7 +122,7 @@ def test_copy(data: Union[pd.DataFrame, DictOfSeries, Dict[str, pd.Series]]):
# the underling series data is the same
# the underling series data is the same
for
c
in
shallow
.
columns
:
for
c
in
shallow
.
columns
:
assert
shallow
.
_data
[
c
].
index
is
flags
.
_data
[
c
].
index
assert
shallow
.
_data
[
c
].
index
.
equals
(
flags
.
_data
[
c
].
index
)
# the underling series data was copied
# the underling series data was copied
for
c
in
deep
.
columns
:
for
c
in
deep
.
columns
:
...
...
This diff is collapsed.
Click to expand it.
tests/core/test_history.py
+
1
−
1
View file @
0ae8552c
...
@@ -143,7 +143,7 @@ def test_copy(data):
...
@@ -143,7 +143,7 @@ def test_copy(data):
assert
is_equal
(
deep
,
shallow
)
assert
is_equal
(
deep
,
shallow
)
# underling pandas data was only copied with deep=True
# underling pandas data was only copied with deep=True
assert
shallow
.
hist
.
index
is
hist
.
hist
.
index
assert
shallow
.
hist
.
index
.
equals
(
hist
.
hist
.
index
)
assert
deep
.
hist
.
index
is
not
hist
.
hist
.
index
assert
deep
.
hist
.
index
is
not
hist
.
hist
.
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