Skip to content

Commit

Permalink
Use elif instead of if in convert_type function
Browse files Browse the repository at this point in the history
  • Loading branch information
jrnkng committed Jan 9, 2024
1 parent 2340fe6 commit ddf9a58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions df_to_azure/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ def column_types(self) -> dict:
def convert_type(col_name, col_type):
if is_string_dtype(col_type):
return string
if is_bool_dtype(col_type):
elif is_bool_dtype(col_type):
return Boolean()
if is_integer_dtype(col_type):
elif is_integer_dtype(col_type):
return Integer()
if is_float_dtype(col_type):
elif is_float_dtype(col_type):
return numeric
if is_datetime64_any_dtype(col_type):
elif is_datetime64_any_dtype(col_type):
return DateTime()
if isinstance(col_type, CategoricalDtype):
elif isinstance(col_type, CategoricalDtype):
return string
else:
raise ValueError(f"Column {col_name} has unknown dtype: {col_type}")
Expand Down

0 comments on commit ddf9a58

Please sign in to comment.