skcriteria.utils.cmanagers module

Multiple context managers to use inside scikit-criteria.

skcriteria.utils.cmanagers.df_temporal_header(df, header, name=None)[source]

Temporarily replaces a DataFrame columns names.

Optionally also assign another name to the columns.

  • header (sequence) – The new names of the columns.

  • name (str or None (default None)) – New name for the index containing the columns in the DataFrame. If ‘None’ the original name of the columns present in the DataFrame is preserved.