Background: I obtained a list of points from Google maps extracted data as a csv. Cleaned it in Pandas, and exported it as a JSON file. (Used Records for export)
Issue: Coordinates are strings. Which makes sense because initially, the coordinates where tied in with a url
Example: https://www.google.com/maps/search/{coordinates}
I used the replace function to clear out the text to only remain with the coordinates. Is there a way to make my values in my Location column numerical type and putting them in a list.
Example Mock-up data of what my exported JSON file looks like:
[
{
"Bin":"Yes",
"Location":"##.##,-###.##"
},
I was trying to clean my data to look like the example below
Example of a GeoJSON file I was trying to model
[
{
location: [41.8781, -87.6298],
city: "Chicago"
},
Goal: I am trying to make a custom map for my use in mapbox
Example Mock-up of how my DataFrame looks like
Bin Location
0 Yes ##.##,-###.##
1 Yes ##.##,-###.##
Input: df.types
Output:
Bin object
Location object
dtype: object
Thank you for the help.