macpie.pandas.get_col_name#

macpie.pandas.get_col_name(df: DataFrame, col_name)#

Get the properly-cased column name from df, ignoring case.

Parameters:
dfDataFrame
col_namestr, tuple of str (for MultiIndexes)

Case-insensitive name of the column.

Returns:
str, tuple of str (if MultiIndex)

The properly-cased column name.

Raises:
KeyError

If col_name is None or not found in the DataFrame.