Implement convert_pandas_nullable for pandas nullable boolean dtype

This commit is contained in:
RunasSudo 2022-11-10 18:46:54 +11:00
parent b40f63aa43
commit 040aa2d463
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ def convert_pandas_nullable(df):
if df_cleaned is None:
df_cleaned = df.copy()
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:
return df