Skip to content

Commit

Permalink
fix: to_category misshandling pd.NA (#1464)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarros authored and aquemy committed Oct 10, 2023
1 parent 472c216 commit d5bbe7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ydata_profiling/model/typeset_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def to_category(series: pd.Series, state: dict) -> pd.Series:
val = series.astype(str)
if hasnans:
val = val.replace("nan", np.nan)
val = val.replace("<NA>", np.nan)

return val.astype("string")

Expand Down

0 comments on commit d5bbe7d

Please sign in to comment.