diff --git a/src/sssom/util.py b/src/sssom/util.py index 2ee1d528..ab8f0241 100644 --- a/src/sssom/util.py +++ b/src/sssom/util.py @@ -168,7 +168,8 @@ 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 - pd.set_option("future.no_silent_downcasting", True) + if "future.no_silent_downcasting" in pd.options: + pd.set_option("future.no_silent_downcasting", True) df.replace("", np.nan, inplace=True) df.dropna(axis=1, how="all", inplace=True) # remove columns with all row = 'None'-s.