Skip to content

API: __name__ of str.cat.methods wrong #23551

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

Closed
h-vetinari opened this issue Nov 7, 2018 · 0 comments · Fixed by #23167
Closed

API: __name__ of str.cat.methods wrong #23551

h-vetinari opened this issue Nov 7, 2018 · 0 comments · Fixed by #23167
Labels
Bug Internals Related to non-user accessible pandas implementation Strings String extension data type and string data
Milestone

Comments

@h-vetinari
Copy link
Contributor

While working on #23167, I found out that the names of several methods that are generated by wrappers are not set correctly (which matters because I need them for error reporting).

E.g.

>>> import pandas as pd
>>> pd.Series(['']).str.lower.__name__
'<lambda>'
>>> pd.Series(['']).str.upper.__name__
'<lambda>'
>>> pd.Series(['']).str.title.__name__
'<lambda>'
>>> pd.Series(['']).str.capitalize.__name__
'<lambda>'
>>> pd.Series(['']).str.swapcase.__name__
'<lambda>'
>>> # same for isalnum, isalpha, isdigit, isspace, islower, isupper, istitle, isnumeric, isdecimal
>>>
>>> pd.Series(['']).str.count.__name__
'str_count'
>>> pd.Series(['']).str.startswith.__name__
'str_startswith'
>>> pd.Series(['']).str.endswith.__name__
'str_endswith'
>>> pd.Series(['']).str.findall.__name__
'str_findall'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Internals Related to non-user accessible pandas implementation Strings String extension data type and string data
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants