Skip to content

Commit

Permalink
fix: use pn.NA instead
Browse files Browse the repository at this point in the history
  • Loading branch information
lkstrp committed Jun 11, 2024
1 parent 3093aaf commit 1279b87
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions powerplantmatching/cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,7 @@ def aggregate_units(
df = cliques(df, duplicates)
df = df.groupby("grouped").agg(props_for_groups)

# Downcasting in replace is deprecated
with pd.option_context("future.no_silent_downcasting", True):
df[str_cols] = df[str_cols].replace("", np.nan).infer_objects(copy=False)
df[str_cols] = df[str_cols].replace("", pd.NA)

df = (
df.assign(
Expand Down

0 comments on commit 1279b87

Please sign in to comment.