I wrote a script to query a PostGIS database, returning a Pandas dataframe like this:
ID ... WKT
0 1 ... LINESTRING(1.5047434 42.6319022,1.5053385 42.6...
1 2 ... LINESTRING(1.5206333 42.5291144,1.5206306 42.5...
Now I am trying to write this into a shapefile with GeoPandas, according to their documentation:
We use shapely.wkt sub-module to parse wkt format:
from shapely import wkt
df['Coordinates'] = geopandas.GeoSeries.from_wkt(df['Coordinates'])
But when I tried to do the same, I got:
AttributeError: type object 'GeoSeries' has no attribute 'from_wkt'
My GeoPandas:
geopandas 0.8.1 py_0 conda-forge