Commit 292ec608 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

MNT: Work around pandas value set on slice warning

parent 44a16aa4
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment