Skip to content

Commit

Permalink
Update util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn committed Nov 8, 2024
1 parent 86fe579 commit f0966fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sssom/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ def from_mapping_set_document(cls, doc: MappingSetDocument) -> "MappingSetDataFr

# ! This will break when pandas >= 3.0.0 is released
# https://github.com/pandas-dev/pandas/issues/57734
if "future.no_silent_downcasting" in pd.options:
try:
pd.set_option("future.no_silent_downcasting", True)
except KeyError:
# Option does not exist in this version of pandas
pass
df.replace("", np.nan, inplace=True)
df.dropna(axis=1, how="all", inplace=True) # remove columns with all row = 'None'-s.

Expand Down

0 comments on commit f0966fb

Please sign in to comment.