excel_colname
- mdtools.numpy_helper_functions.excel_colname(n, upper=True)[source]
Convert an integer to its corresponding Excel-style column name.
- Parameters:
- Returns:
col_name (
str
) – Excel-style column name.
See also
mdtools.numpy_helper_functions.excel_colnum()
Inverse function
Examples
>>> mdt.nph.excel_colname(0) '0'
>>> mdt.nph.excel_colname(1) 'A'
>>> mdt.nph.excel_colname(1, upper=False) 'a'
>>> mdt.nph.excel_colname(-1) 'A'
>>> mdt.nph.excel_colname(26) 'Z'
>>> mdt.nph.excel_colname(27) 'AA'
>>> mdt.nph.excel_colname(27, upper=False) 'aa'