From d1d8b5319a8bed33bc9ca861cdfdfea68cae5056 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Sun, 5 Jun 2022 00:14:39 +0200 Subject: [PATCH] CLN: no need to specify crs in _constructor_sliced (#2448) --- geopandas/geodataframe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py index e8a1e51..48bb03e 100644 --- a/geopandas/geodataframe.py +++ b/geopandas/geodataframe.py @@ -1467,7 +1467,7 @@ individually so that features may have different properties @property def _constructor_sliced(self): - def _geodataframe_constructor_sliced(data=None, index=None, crs=None, **kwargs): + def _geodataframe_constructor_sliced(*args, **kwargs): """ A specialized (Geo)Series constructor which can fall back to a Series if a certain operation does not produce geometries: @@ -1483,10 +1483,10 @@ individually so that features may have different properties GeoSeries if we are sure we are in a row selection case (by checking the identity of the index) """ - srs = pd.Series(data, index, **kwargs) + srs = pd.Series(*args, **kwargs) is_row_proxy = srs.index is self.columns if is_geometry_type(srs) and not is_row_proxy: - srs = GeoSeries(srs, crs=crs) + srs = GeoSeries(srs) return srs return _geodataframe_constructor_sliced