Skip to content

Commit ddd531a

Browse files
fix typing + fix conversion for old pyarrow
1 parent adf2b99 commit ddd531a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/core/arrays/categorical.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,9 +2677,9 @@ def _str_map(
26772677
categories = self.categories
26782678
codes = self.codes
26792679
if categories.dtype == "string":
2680-
result = categories.array._str_map(f, na_value, dtype)
2680+
result = categories.array._str_map(f, na_value, dtype) # type: ignore[attr-defined]
26812681
if (
2682-
categories.dtype.na_value is np.nan
2682+
categories.dtype.na_value is np.nan # type: ignore[union-attr]
26832683
and is_bool_dtype(dtype)
26842684
and (na_value is lib.no_default or isna(na_value))
26852685
):

pandas/core/arrays/string_arrow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def _convert_bool_result(self, values, na=lib.no_default, method_name=None):
240240
values = values.fill_null(False)
241241
else:
242242
values = values.fill_null(na)
243-
return values.to_numpy(zero_copy_only=False)
243+
return values.to_numpy()
244244
else:
245245
if na is not lib.no_default and not isna(na): # pyright: ignore [reportGeneralTypeIssues]
246246
values = values.fill_null(na)

0 commit comments

Comments
 (0)