How can I construct a multi-index in pandas for an example dataframe of:
import pandas as pd
df = pd.DataFrame({'day':['2020-01-01', '2020-01-02'], 'value_mean':[1,5], 'value_max':[40,100]})
Transform the existing:
day value_mean value_max
0 2020-01-01 1 40
1 2020-01-02 5 100
To something like:
value
day mean max
0 2020-01-01 1 40
1 2020-01-02 5 100