My goal is to extract elements from a list within a column to new columns.
I have tried using the common bracket notation:
df['lat'] = df['query'][0]
df['lon'] = df['query'][1]
The error I get is: "ValueError: Length of values (2) does not match length of index (1)"
What is the error trying to say?
Here is a solution you can try out,
df['lat'], df['lon'] = df['query'].str[0], df['query'].str[1]