Skip to content

Commit

Permalink
handle all empty values column
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 committed Jan 13, 2025
1 parent 89407e4 commit edf7105
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gluestick/pandas_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def enforce_exploded_col_types(df, column_name, stream=None):

else:
for col in exploded_columns:
# if all column values are false let pandas infere type
if df[col].dropna().empty:
continue

first_non_null_value = df[col].dropna().iloc[0]
if type(first_non_null_value) in [list, dict, str]:
continue
Expand Down

0 comments on commit edf7105

Please sign in to comment.