diff --git a/gspread_pandas/spread.py b/gspread_pandas/spread.py index 50f0046..ea3db40 100644 --- a/gspread_pandas/spread.py +++ b/gspread_pandas/spread.py @@ -396,12 +396,13 @@ def sheet_to_df( col_names = parse_sheet_headers(vals, header_rows) # remove rows where everything is null, then replace nulls with '' - df = ( - pd.DataFrame(vals[header_rows or 0 :]) - .replace("", np.nan) - .dropna(how="all") - .fillna("") - ) + with pd.option_context('future.no_silent_downcasting', True): + df = ( + pd.DataFrame(vals[header_rows or 0 :]) + .replace("", np.nan) + .dropna(how="all") + .fillna("") + ) # replace values with a different value render option before we set the # index in set_col_names