Skip to content

Commit db4b760

Browse files
committed
Addressed copilot suggestion
1 parent a23ece8 commit db4b760

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hed/schema/schema_io/hed_id_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_all_ids(df):
6666
Union[Set, None]: None if this has no HED column, otherwise all unique numbers as a set.
6767
"""
6868
if constants.hed_id in df.columns:
69-
modified_df = df[constants.hed_id].apply(lambda x: x.removeprefix("HED_") if x else x)
69+
modified_df = df[constants.hed_id].apply(lambda x: x.removeprefix("HED_") if isinstance(x, str) else x)
7070
modified_df = pd.to_numeric(modified_df, errors="coerce").dropna().astype(int)
7171
return set(modified_df.unique())
7272
return None

0 commit comments

Comments
 (0)