I have multindex with two columns in a dataframe as follow
import numpy as np
import pandas as pd
df = pd.DataFrame(np.array([[1, 2, 3, 0], [1, 5, 6, 0], [2, 5, 6, 0]]),columns=['a','b','c', 'd'])
df
df.set_index(['a', 'b'],inplace=True)
df
That produces index in a different line of column header
c d
a b
1 2 3 0
5 6 0
2 5 6 0
How index and column can be put in the same line without missing index columns?
Desired output, index and columns in the same line
a b c d
1 2 3 0
5 6 0
2 5 6 0
