I have two dataframes
sessions = pd.DataFrame(
{"ID": [1,2,3,4,5],
"2018-06-30": [23,34,45,67,75],
"2018-07-31": [32,43,45,76,57]})
leads = pd.DataFrame(
{"ID": [1,2,3,4,5],
"2018-06-30": [7,10,28,15,30],
"2018-07-31": [7,10,28,15,30]})
I wanna merge the two dataframes on ID and then create a multi-index to look like:
6/30/2018 7/31/2018
ID sessions leads sessions leads
1 23 7 32 7
2 34 10 43 12
3 45 28 45 30
4 67 15 76 18
5 75 30 57 30
How can I do it?
A direct pd.merge will create suffixes _x, _y which I do not want.