79148407

Date: 2024-11-01 14:48:50
Score: 0.5
Natty:
Report link

From GeoPandas 0.9.0 I would use geopandas.GeoSeries.from_wkt

import geopandas as gpd


df = gpd.read_csv('myFile.csv')
df.head()
    BoroName    geometry
0   Brooklyn    MULTIPOLYGON (((-73.97604935657381 40.63127590...
1   Queens      MULTIPOLYGON (((-73.80379022888098 40.77561011...
2   Queens      MULTIPOLYGON (((-73.8610972440186 40.763664477...
3   Queens      MULTIPOLYGON (((-73.75725671509139 40.71813860...
4   Manhattan   MULTIPOLYGON (((-73.94607828674226 40.82126321...


gdf = gpd.GeoDataFrame(
    geometry=gpd.GeoSeries.from_wkt(df['geometry'], crs=4326), data=df
)
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: gman