Skip to content

Commit decf815

Browse files
jirhikerCopilot
andauthored
Update transfers/transferer.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3620703 commit decf815

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

transfers/transferer.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,13 @@ def _dedupe_rows(
160160
else:
161161
row_key = tuple(row.get(k) for k in key_list)
162162

163-
if row_key is None or (
164-
isinstance(row_key, tuple) and any(k is None for k in row_key)
165-
):
163+
# Treat None and any pd.isna(...) value (e.g., NaN) as missing keys
164+
if isinstance(row_key, tuple):
165+
is_missing = any(pd.isna(k) for k in row_key)
166+
else:
167+
is_missing = pd.isna(row_key)
168+
169+
if is_missing:
166170
if include_missing:
167171
passthrough.append(row)
168172
continue

0 commit comments

Comments
 (0)