from decimal import Decimal
import pandas as pd
df = pd.DataFrame([
["1000123797207765", 0, 129.26, 0, 29.26],
], columns=pd.MultiIndex.from_tuples(
[
("", "ID"),
("2022-09-01", "origin"),
("2022-09-01", "checked"),
("2022-09-02", "origin"),
("2022-09-02", "checked"),
]
))
2022-09-01 2022-09-02
ID origin checked origin checked
0 1000123797207765 0 129.26 0 29.26
As above codes showed, I get a dataframe. Now I want to reset index to get a dataframe with below format
2022-09-01 2022-09-02
ID origin checked origin checked
1000123797207765 0 129.26 0 29.26
How can I make it? Great thanks.