Importing packages

In [1]:
import pandas as pd
In [2]:
cols = pd.MultiIndex.from_tuples([("a", "b"), ("a", "c")])
df = pd.DataFrame([[1,2], [3,4]], columns=cols)
df
Out[2]:
a
b c
0 1 2
1 3 4
In [3]:
print(df.columns)
MultiIndex(levels=[['a'], ['b', 'c']],
           labels=[[0, 0], [0, 1]])
In [4]:
# dropping multilevel column index using pandas function
df.columns = df.columns.droplevel()
df
Out[4]:
b c
0 1 2
1 3 4

OR

In [5]:
# rewriting columns
df.columns = ['b', 'c']
df
Out[5]:
b c
0 1 2
1 3 4