mirror of
https://github.com/wassname/geopandas.git
synced 2026-09-26 13:50:17 +08:00
BUG/TST: support parametrized string dtype (#1933)
This commit is contained in:
+1
-1
@@ -1030,7 +1030,7 @@ class GeometryArray(ExtensionArray):
|
||||
pd_dtype = pd.api.types.pandas_dtype(dtype)
|
||||
if isinstance(pd_dtype, pd.StringDtype):
|
||||
# ensure to return a pandas string array instead of numpy array
|
||||
return pd.array(string_values, dtype="string")
|
||||
return pd.array(string_values, dtype=pd_dtype)
|
||||
return string_values.astype(dtype, copy=False)
|
||||
else:
|
||||
return np.array(self, dtype=dtype, copy=copy)
|
||||
|
||||
Reference in New Issue
Block a user