Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

R3dIO
Copy link

@R3dIO R3dIO commented Dec 14, 2021

Copy link
Member

@phofl phofl left a 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])
Copy link
Member

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

@R3dIO
Copy link
Author

R3dIO commented Dec 16, 2021

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,
Copy link
Contributor

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.

@jreback jreback added the Docs label Dec 17, 2021
@Anunaya07
Copy link

Hello I am first time contributor. Is this issue still open can I work on it?

@phofl
Copy link
Member

phofl commented Jan 4, 2022

@R3dIO are you interested in continuing?

@R3dIO
Copy link
Author

R3dIO commented Jan 4, 2022

Sure, let me know how can I help?

@R3dIO
Copy link
Author

R3dIO commented Jan 4, 2022

I'll review my PR and fix the changed soon

@Anunaya07
Copy link

Can I also try too?

@phofl
Copy link
Member

phofl commented Jan 4, 2022

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

@Anunaya07
Copy link

OK. Thank you.

@mroeschke
Copy link
Member

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.

@mroeschke mroeschke closed this Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Series.str.strip() removes numeric and bool values instead of only string whitespace
5 participants