Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: String methods has no method "isascii()" #59091

Open
3 tasks done
ujex256 opened this issue Jun 25, 2024 · 2 comments · May be fixed by #59096
Open
3 tasks done

BUG: String methods has no method "isascii()" #59091

ujex256 opened this issue Jun 25, 2024 · 2 comments · May be fixed by #59096
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@ujex256
Copy link

ujex256 commented Jun 25, 2024

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import pandas as pd
series = pd.Series(["a", "b", "c", "あ", ""])

series.str.isalnum()
"""
0    True
1    True
2    True
3    True
4    False
dtype: bool
"""

series.str.isascii()
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# AttributeError: 'StringMethods' object has no attribute 'isascii'

Issue Description

pd.Series.str does not support isascii() metod.

Expected Behavior

The code shown above would look like this.

series.str.isascii()
"""
0    True
1    True
2    True
3    False
4    True
dtype: bool
"""

Installed Versions

INSTALLED VERSIONS

commit : d9cdd2e
python : 3.11.7.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.22631
machine : AMD64
processor : Intel64 Family 6 Model 151 Stepping 2, GenuineIntel
byteorder : little
LC_ALL : None
LANG : ja_JP.UTF-8
LOCALE : Japanese_Japan.932

pandas : 2.2.2
numpy : 2.0.0
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 69.5.1
pip : 24.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 5.2.2
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 8.25.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.3
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None

@ujex256 ujex256 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 25, 2024
@krishsharma0413
Copy link

Can a contributor look into this and if needed I will work on the PR :P
unless @ujex256 or someone else is already working on it.

@ujex256
Copy link
Author

ujex256 commented Jun 25, 2024

@krishsharma0413
Thank you for your help!
I was already trying to get the PR out.
I appreciate your concern.

@ujex256 ujex256 linked a pull request Jun 25, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants