geopandas.GeoSeries.from_wkt#

classmethod GeoSeries.from_wkt(data, index=None, crs=None, **kwargs)[source]#

Alternate constructor to create a GeoSeries from a list or array of WKT objects

Parameters
dataarray-like, Series

Series, list, or array of WKT objects

indexarray-like or Index

The index for the GeoSeries.

crsvalue, optional

Coordinate Reference System of the geometry objects. Can be anything accepted by pyproj.CRS.from_user_input(), such as an authority string (eg “EPSG:4326”) or a WKT string.

kwargs

Additional arguments passed to the Series constructor, e.g. name.

Returns
GeoSeries

Examples

>>> wkts = [
... 'POINT (1 1)',
... 'POINT (2 2)',
... 'POINT (3 3)',
... ]
>>> s = geopandas.GeoSeries.from_wkt(wkts)
>>> s
0    POINT (1.00000 1.00000)
1    POINT (2.00000 2.00000)
2    POINT (3.00000 3.00000)
dtype: geometry