Each feature frame will be a batch of data. I would like to extract all values for the key 'coordinates' in the col geometry and iteratively insert into another df.
With that same df, I would also like to store data extracted from the properties col. Properties col has many keys.
Each source frame will have both 'geometry':'coordinates' and 'properties', which will consists of various keys.
Each col in this new DataFrame will be a key inside either 'geometry' or 'properties'.
For example:
coordinates name
0 [-108.600,39.09] 'Target'
1 [51.459,82.04] 'Costco'
2 [-35.459,82.04] 'BJ's Wholesale Club'
3 [98.459,12.07] 'Walgreens'
4 [105.404,96.04] 'Walmart
I can access both cols with the below:
coord_frame = features_frame['geometry'][:]
properties_frame = features_frame['properties'][:]
But that only splits the frame in two. Typically, if I did:
Feature_Frame['geometry'][:]['coordinates']
I'd get the values for the coordinates key in the geometry col for all rows, if I did:
Feature_Frame['properties'][:]['name']
I'd get the value for the name key in the properties col for all rows.
Instead I just get a key error saying name or coordinates dont exist.