import pandas as pd
df1 = pd.DataFrame(np.random.rand(3, 2))
df2 = pd.DataFrame(np.random.rand(4, 2))
df3 = pd.DataFrame(np.random.rand(5, 2))
print(pd.concat([df1, df2, df3], keys=['A', 'B', 'C']))
Add multi-index to pandas dataframe and keep current index