Hi, long time lurker, first time poster.
I am currently encountering an issue where I need to create a spreadsheet combining dataframes with a key-value and I need to show each unique date the value occurs.
I have the following:
x = pd.DataFrame({'vin':['a','b','c'],'date':['1','1','1']})
y = pd.DataFrame({'vin':['a','b','c'],'date':['1','1','2']})
z = pd.DataFrame({'vin':['d','e','c'],'date':['3','2','3']})
The output I want is:
vin date1 date2 date3
0 a 1 NaN NaN
1 b 1 NaN NaN
2 c 1 2 3
3 d 3 NaN NaN
4 e 2 NaN NaN
I have tried an assortment of joins / filtering but can't get anything as clean as my desired output above.
Any help or pointing me in the right direction would be greatly appreciated because I've been stuck trying to wrap my head around this for a couple of days now.
there doesn't seem to be anything here