@@ -290,7 +290,7 @@ def validate_identifiers(
290290 raise PrefixLocationError
291291 elif prefix is not None :
292292 return _help_validate_identifiers (df , column , prefix )
293- else : # prefix_column is not None
293+ elif prefix_column is not None :
294294 prefix_column = _norm_column (df , prefix_column )
295295 prefixes = df [prefix_column ].unique ()
296296 if 0 == len (prefixes ):
@@ -319,11 +319,13 @@ def _validate_lambda(_p: str | None, _i: str) -> bool | None:
319319 "pd.Series[bool]" ,
320320 _multi_column_map (
321321 df ,
322- [cast ( str , prefix_column ) , column ],
322+ [prefix_column , column ],
323323 _validate_lambda ,
324324 use_tqdm = use_tqdm ,
325325 ),
326326 )
327+ else :
328+ raise RuntimeError
327329 if target_column :
328330 df [target_column ] = results
329331 return results
@@ -388,7 +390,7 @@ def identifiers_to_curies(
388390 df = brpd.get_goa_example()
389391
390392 # Use a combination of column 1 (DB) and column 2 (DB Object ID) for conversion
391- df[' subject_curie' ] = brpd.identifiers_to_curies(df, column=1, prefix_column=0)
393+ df[" subject_curie" ] = brpd.identifiers_to_curies(df, column=1, prefix_column=0)
392394 """
393395 # FIXME do pattern check first so you don't get bananas
394396 column = _norm_column (df , column )
@@ -587,6 +589,7 @@ def pd_collapse_to_curies(
587589 * ,
588590 target_column : str ,
589591) -> None :
592+ """Collapse a prefix and identifier column together into a CURIE column."""
590593 prefix_column = _norm_column (df , prefix_column )
591594 identifier_column = _norm_column (df , identifier_column )
592595 df [target_column ] = [
0 commit comments