Skip to content

Commit

Permalink
saveguard against invalid comparison in pandas comparator
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikZuercherQC committed Oct 31, 2024
1 parent 326fe0b commit 2527c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tabulardelta/comparators/pandas_comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def compare_pandas(
left, right, float_rtol, float_atol, True
)
else:
joined[col + "_equal"] = (left == right) | pd.isna(left) & pd.isna(right)
joined[col + "_equal"] = (left == right).fillna(False) | pd.isna(left) & pd.isna(right)
unequal = joined[~joined[col + "_equal"].astype("bool")]
change = _value_change(unequal, join_columns, col, suffixes, old_dt, new_dt)
if len(change) > 0:
Expand Down

0 comments on commit 2527c5f

Please sign in to comment.