Create Sample Data
import pandas
from pandas import DataFrame
data = [["2018-03-01","2018-03-01","2018-05-01","2018-05-01","2018-06-03"],[20,30,40,10,70],
["2017-12-01","2017-12-01","2017-12-05","2017-12-06","2017-12-21"]]
sample_df = DataFrame.from_records(data).transpose()
sample_df
Sample Data
0 1 2
0 2018-03-01 20 2017-12-01
1 2018-03-01 30 2017-12-01
2 2018-05-01 40 2017-12-05
3 2018-05-01 10 2017-12-06
4 2018-06-03 70 2017-12-21
Need to create something like below after grouping on column "0" and creating a list of values in column 2 and column 3
0 1 2
2018-03-01 [20,30] [2017-12-01,2017-12-01]
2018-05-01 [40,10] [2017-12-05,2017-12-06]
2018-06-03 [70] [2017-12-21]
Tried using apply and lambda functions but it didn't work out.
Any suggestions.