Skip to content

Commit dd59832

Browse files
revert changes to StringArray.astype. fixed in pandas-dev#40450
1 parent 1f35f06 commit dd59832

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

pandas/core/arrays/string_.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,16 +308,12 @@ def __setitem__(self, key, value):
308308
super().__setitem__(key, value)
309309

310310
def astype(self, dtype, copy=True):
311-
from pandas.core.arrays.string_arrow import ArrowStringDtype
312-
313311
dtype = pandas_dtype(dtype)
314312

315313
if is_dtype_equal(dtype, self.dtype):
316314
if copy:
317315
return self.copy()
318316
return self
319-
elif isinstance(dtype, ArrowStringDtype):
320-
return ArrowStringDtype.construct_array_type()._from_sequence(self)
321317
elif isinstance(dtype, _IntegerDtype):
322318
arr = self._ndarray.copy()
323319
mask = self.isna()

0 commit comments

Comments
 (0)