Pandas style object with multi-index
问题 I am formatting a pandas dataframe with styler to highlight columns and format numbers. I also want to apply multi-index for more clear, pleasant and easy to read. Since I apply Styler to subset of columns it does not work work with the multi-index. Example: arrays = [np.hstack([['One']*2, ['Two']*2]) , ['A', 'B', 'C', 'D']] columns = pd.MultiIndex.from_arrays(arrays) data = pd.DataFrame(np.random.randn(5, 4), columns=list('ABCD')) data.columns = columns import seaborn as sns cm = sns.light