Skip to content

Commit

Permalink
Make sure setting hed strings can handle empty
Browse files Browse the repository at this point in the history
  • Loading branch information
IanCa committed May 9, 2023
1 parent 4fd9541 commit b2d31b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hed/models/column_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def set_hed_strings(self, new_strings):
if isinstance(new_strings, pd.Series):
if self.column_type == ColumnType.Categorical:
new_strings = new_strings.to_dict()
elif new_strings.empty:
return False
else:
new_strings = new_strings.iloc[0]

Expand Down

0 comments on commit b2d31b7

Please sign in to comment.