Код: Выделить всё
import pandas as pd
df = pd.DataFrame()
df.loc[('a', 'b'), 'col1'] = 1
print(df)
Подробнее здесь: https://stackoverflow.com/questions/785 ... multiindex
Код: Выделить всё
import pandas as pd
df = pd.DataFrame()
df.loc[('a', 'b'), 'col1'] = 1
print(df)