We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da38bc4 commit c049961Copy full SHA for c049961
gspread_pandas/util.py
@@ -217,13 +217,7 @@ def fillna(df, fill_value=""):
217
"""
218
for col in df.dtypes[df.dtypes == "category"].index:
219
if fill_value not in df[col].cat.categories:
220
- df[col].cat.add_categories([fill_value], inplace=True)
221
- # Known bug https://github.com/pandas-dev/pandas/issues/25472
222
- if StrictVersion(pd.__version__) >= StrictVersion("1.0"):
223
- for col in df.dtypes[
224
- df.dtypes.apply(lambda x: x in ["float64", "int16"])
225
- ].index:
226
- df[col] = df[col].astype("float")
+ df[col] = df[col].cat.add_categories([fill_value])
227
return df.fillna(fill_value)
228
229
0 commit comments