I have a dataframe like below.
|items(index)|event|day|
|---- |------|-----|
|1000|[buy, buy]|[2019-03-26, 2019-04-26]|
|1001|[buy, sell]|[2019-05-26, 2019-06-26]|
|1002|[buy, sell]|[2019-04-21, 2019-04-29]|
|1003|[sell, buy]|[2019-03-21, 2019-04-23]|
The order of values in the list of event columns corresponds to the order of values in the list of day columns; thus, 1000's first buy action occurred 2019-03-26.
The problem is that I want the Datetime to be the index and the current index to be the column, so it looks like the following.
|day(index)|1000|1001|1002|1003|
|----|------|----- |-----|-----|
|2019-03-21| | | |sell |
|2019-03-26|buy| | | |
|2019-04-21| | |buy | |
|2019-04-23| | | | |
|2019-04-26|buy| | | |
|2019-04-29| | |sell | |
|2019-05-26| |buy| | |
|2019-06-26| |sell| | |
I don't know how I can effectively convert the above dataframe.
