Skip to content

Commit d31faac

Browse files
committed
fix: add str.isascii method
1 parent 39a3bf3 commit d31faac

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

pandas/core/strings/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ def _str_isalnum(self):
174174
def _str_isalpha(self):
175175
pass
176176

177+
@abc.abstractmethod
178+
def _str_isascii(self):
179+
pass
180+
177181
@abc.abstractmethod
178182
def _str_isdecimal(self):
179183
pass

pandas/core/strings/object_array.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ def _str_isalnum(self):
409409
def _str_isalpha(self):
410410
return self._str_map(str.isalpha, dtype="bool")
411411

412+
def _str_isascii(self):
413+
return self._str_map(str.isascii, dtype="bool")
414+
412415
def _str_isdecimal(self):
413416
return self._str_map(str.isdecimal, dtype="bool")
414417

0 commit comments

Comments
 (0)