Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions gspread_pandas/spread.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down