Skip to content

Commit 154496a

Browse files
remove redundant type check
1 parent b7d0ab8 commit 154496a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/core/arrays/string_arrow.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,7 @@ def __len__(self) -> int:
257257

258258
@doc(ExtensionArray.factorize)
259259
def factorize(self, na_sentinel: int = -1) -> Tuple[np.ndarray, ExtensionArray]:
260-
if pa.types.is_dictionary(self._data.type):
261-
raise NotImplementedError()
262-
elif self._data.num_chunks == 1:
263-
# Dictionaryencode and do the same as above
260+
if self._data.num_chunks == 1:
264261
encoded = self._data.chunk(0).dictionary_encode()
265262
indices = encoded.indices.to_pandas()
266263
if indices.dtype.kind == "f":

0 commit comments

Comments
 (0)