Implement convert_pandas_nullable for pandas nullable boolean dtype
This commit is contained in:
parent
b40f63aa43
commit
040aa2d463
@ -74,6 +74,10 @@ def convert_pandas_nullable(df):
|
|||||||
if df_cleaned is None:
|
if df_cleaned is None:
|
||||||
df_cleaned = df.copy()
|
df_cleaned = df.copy()
|
||||||
df_cleaned[col] = df[col].astype(str(df[col].dtype).lower())
|
df_cleaned[col] = df[col].astype(str(df[col].dtype).lower())
|
||||||
|
elif df[col].dtype == 'boolean':
|
||||||
|
if df_cleaned is None:
|
||||||
|
df_cleaned = df.copy()
|
||||||
|
df_cleaned[col] = df[col].astype('bool')
|
||||||
|
|
||||||
if df_cleaned is None:
|
if df_cleaned is None:
|
||||||
return df
|
return df
|
||||||
|
Loading…
Reference in New Issue
Block a user