Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more dtypes #122

Merged
merged 12 commits into from
Mar 16, 2023
Prev Previous commit
Fix pandas cat type
  • Loading branch information
TimvdHeijden committed Mar 16, 2023
commit 59d1b35420fa27272026897905aaf41e872cb524
3 changes: 2 additions & 1 deletion df_to_azure/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from numpy import dtype
from pandas import (
BooleanDtype,
CategoricalDtype,
DataFrame,
DatetimeTZDtype,
Float64Dtype,
Expand Down Expand Up @@ -252,7 +253,7 @@ def column_types(self) -> dict:
dtype("bool"): Boolean(),
BooleanDtype(): Boolean(),
DatetimeTZDtype(tz="utc"): DateTime(),
dtype("category"): string,
CategoricalDtype(): string,
}

col_types = {col_name: type_conversion[col_type] for col_name, col_type in self.df.dtypes.to_dict().items()}
Expand Down