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

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

Closed
h-vetinari opened this issue Nov 7, 2018 · 0 comments

Comments

@h-vetinari
Copy link
Contributor

commented Nov 7, 2018

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
Projects
None yet
3 participants
You can’t perform that action at this time.