Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
funpack
Commits
292ec608
Commit
292ec608
authored
Aug 19, 2021
by
Paul McCarthy
🚵
Browse files
MNT: Work around pandas value set on slice warning
parent
44a16aa4
Changes
1
Hide whitespace changes
Inline
Side-by-side
funpack/loadtables.py
View file @
292ec608
...
...
@@ -807,14 +807,12 @@ def mergeTableFiles(
# non-na values in later files take
# precedence.
for
c
in
[
c
[:
-
2
]
for
c
in
merged
.
columns
if
c
.
endswith
(
'_x'
)]:
bcolname
=
c
+
'_x'
tcolname
=
c
+
'_y'
bcol
=
merged
[
bcolname
]
tcol
=
merged
[
tcolname
]
notna
=
tcol
.
notna
()
bcol
.
loc
[
notna
]
=
tcol
[
notna
]
merged
[
c
]
=
bcol
merged
=
merged
.
drop
(
columns
=
[
bcolname
,
tcolname
])
bname
=
c
+
'_x'
tname
=
c
+
'_y'
merged
[
c
]
=
merged
[
bname
]
notna
=
merged
[
tname
].
notna
()
merged
.
loc
[
notna
,
c
]
=
merged
.
loc
[
notna
,
tname
]
merged
=
merged
.
drop
(
columns
=
[
bname
,
tname
])
base
=
merged
# no base, and no files
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment