hipscatalog_gen.utils._resolve_col_name
- _resolve_col_name(spec, ddf, header)[source]
Resolve a column spec that can be a name or 1-based index.
- Parameters:
spec (str) – Column name or 1-based index as string.
ddf (DataFrame) – Dask DataFrame used to resolve columns.
header (bool) – Whether input has a header row.
- Returns:
Resolved column name.
- Raises:
KeyError – If the column is not found.
IndexError – If a numeric index is out of range.
- Return type:
str