I have a data-frame that looks like
*id*, *name*, *URL*, *Type*
2, birth_f
This will give you the expected result for the "URL" column:
test.groupby(["id", "name"])['URL'].apply(list)
id name
2 birth_france_by_region [http://abc. com, http://pt. python]
3 long_lat [http://abc. com, http://pqur. com]
4 random_time_series [http://sadsdc. com, http://sadcadf. com]
5 birth_names [http://google. com, http://helloworld. com, h...
However, I can't find a solution for both URL and Type columns.
I could propose to do it in 2 steps:
temp_table1 = test.groupby(["id", "name"])['URL'].apply(list)
temp_table2 = test.groupby(["id", "name"])['Type'].apply(list)
temp_table1
& temp_table2