-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Added example for num and bool to pandas.Series.str.strip #44885
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
Conversation
R3dIO
commented
Dec 14, 2021
- closes BUG: Series.str.strip() removes numeric and bool values instead of only string whitespace #44867
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doctests are failing. Could you have a look which one of your changes is causing this?
@@ -1935,6 +1936,31 @@ def encode(self, encoding, errors="strict"): | |||
2 Cat | |||
3 NaN | |||
dtype: object | |||
|
|||
s = pd.Series(['hello ', ' goodbye', 1.0, 0.0, 1, 0, True, False, np.nan]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use other numbers int(True) is 1 and int(False) is 0
Sure I'll have a look |
@@ -1894,7 +1894,8 @@ def encode(self, encoding, errors="strict"): | |||
|
|||
See Also | |||
-------- | |||
Series.str.strip : Remove leading and trailing characters in Series/Index. | |||
Series.str.strip : Remove leading and trailing characters in Series/Index, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wouldn't add any of this, instead you can add in a Notes section a line.
Hello I am first time contributor. Is this issue still open can I work on it? |
@R3dIO are you interested in continuing? |
Sure, let me know how can I help? |
I'll review my PR and fix the changed soon |
Can I also try too? |
Please search for another issue labeled as good first issue. We try to keep ownership, so please don’t Open another pr if someone has already started working on it |
OK. Thank you. |
Thanks for the pull request, but it appears to have gone stale. Please merge in main and address the above comments and we can reopen this PR. Closing. |