I have this list:
my_list = [['ga:date'], ['ga:country', 'ga:date'], ['ga:country', 'ga:date']]
And try to iterate over it in order to get the values and its' positions, like so:
date 1
country 1
date 2
country 1
date 2
It should be later stored in a pandas df, values can be different, there is no fix.
Originally it was a list of dictionaries:
my_original_list = [
[{'name': 'ga:date'}],
[{'name': 'ga:country'}, {'name': 'ga:date'}],
[{'name': 'ga:country'}, {'name': 'ga:date'}]
]
# But I got the values out of it in a list:
my_list = [li['name'] for li in my_original_list]
# the result
my_list = [
['ga:date'],
['ga:country', 'ga:date'],
['ga:country', 'ga:date']
]
Cracked my mind already how to get it, would appreciate any help