geopandas.GeoSeries.set_crs

GeoSeries.set_crs(self, crs=None, epsg=None, inplace=False, allow_override=False)

Set the Coordinate Reference System (CRS) of a GeoSeries.

NOTE: The underlying geometries are not transformed to this CRS. To transform the geometries to a new CRS, use the to_crs method.

Parameters
crspyproj.CRS, optional if epsg is specified

The value can be anything accepted by pyproj.CRS.from_user_input(), such as an authority string (eg “EPSG:4326”) or a WKT string.

epsgint, optional if crs is specified

EPSG code specifying the projection.

inplacebool, default False

If True, the CRS of the GeoSeries will be changed in place (while still returning the result) instead of making a copy of the GeoSeries.

allow_overridebool, default False

If the the GeoSeries already has a CRS, allow to replace the existing CRS, even when both are not equal.

Returns
GeoSeries