Skip to content

Commit cc92867

Browse files
Abby VeCaseyAbby VeCasey
authored andcommitted
ascii3
1 parent ffa15c3 commit cc92867

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

pandas/core/arrays/_arrow_string_mixins.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,11 @@ def _str_isalpha(self):
281281
# return False
282282

283283
def _str_isascii(self):
284-
# Check if the array is of string type (or if the implementation should handle it)
285-
if isinstance(self._pa_array, pa.StringArray):
286-
# Apply the isascii check element-wise using PyArrow's compute functions
287-
result = pc.ascii_is_ascii(self._pa_array)
284+
# Check if the array is of string type (or if the implementation should handle it) # Apply the isascii check element-wise using PyArrow's compute functions
285+
result = pc.ascii_is_ascii(self._pa_array)
288286

289287
# Convert the result to the appropriate format (e.g., PyArrow BooleanArray)
290-
return self._convert_bool_result(result)
291-
292-
# If the input is not a StringArray, handle accordingly (e.g., return False or None)
293-
return False
288+
return self._convert_bool_result(result)
294289

295290
# def _str_isascii(self):
296291
# # Handle the case where self might be a pandas StringArray or similar

0 commit comments

Comments
 (0)