We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a23ece8 commit db4b760Copy full SHA for db4b760
1 file changed
hed/schema/schema_io/hed_id_util.py
@@ -66,7 +66,7 @@ def get_all_ids(df):
66
Union[Set, None]: None if this has no HED column, otherwise all unique numbers as a set.
67
"""
68
if constants.hed_id in df.columns:
69
- modified_df = df[constants.hed_id].apply(lambda x: x.removeprefix("HED_") if x else x)
+ modified_df = df[constants.hed_id].apply(lambda x: x.removeprefix("HED_") if isinstance(x, str) else x)
70
modified_df = pd.to_numeric(modified_df, errors="coerce").dropna().astype(int)
71
return set(modified_df.unique())
72
return None
0 commit comments