Here is pandas data frame format of the data source
cinema kiwi restaurant sushi
0 [2, 2, 2] [5, 5, 5] [2, 2, 2] [14, 14, 14]
1 [2, 2, 2] [2, 2, 2] [2, 2, 2] [2, 2, 2]
2 [1, 1, 1] [1, 1, 1] [10, 10, 10] [1, 1, 1]
I would like to transform it as follow by choosing only the first value of the array
cinema kiwi restaurant sushi
0 2 5 2 14
1 2 2 2 2
2 1 1 10 1
Is there any function to do that ? I was thinking about using the "apply" method but I am not sure if it the best/most straightforward way.
Thank you by advance for your comments.