gspread-pandas icon indicating copy to clipboard operation
gspread-pandas copied to clipboard

Pandas 2.2+ FutureWarning: Deprecated automatic downcasting

Open mephinet opened this issue 1 year ago • 0 comments

When using the latest gspread-pandas version 3.3.0 with latest pandas version 2.2.1, the following FutureWarning is raised:

.../site-packages/gspread_pandas/spread.py:401: FutureWarning: Downcasting behavior in replace is deprecated and will be removed in a future version. To retain the old behavior, explicitly call result.infer_objects(copy=False). To opt-in to the future behavior, set pd.set_option('future.no_silent_downcasting', True)
.replace("", np.nan)

For details, see https://pandas.pydata.org/docs/whatsnew/v2.2.0.html#deprecated-automatic-downcasting

mephinet avatar Mar 27 '24 15:03 mephinet