Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
df = pd.DataFrame()
midx = pd.MultiIndex.from_arrays([["A", "B"], [1, 2]], names=["zero", "one"])
df.style # OK
df.index=[0,1]
df.style # OK
df.index=midx
df.style # IndexError
The error here was not the use of MultiIndex but of the index name display row when there are no columns.