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

DOC/DEPR: sep vs pat in series.str.partition #22676

Closed
h-vetinari opened this issue Sep 12, 2018 · 2 comments · Fixed by #23767
Closed

DOC/DEPR: sep vs pat in series.str.partition #22676

h-vetinari opened this issue Sep 12, 2018 · 2 comments · Fixed by #23767
Labels
Deprecate Functionality to remove in pandas Docs
Milestone

Comments

@h-vetinari
Copy link
Contributor

h-vetinari commented Sep 12, 2018

All the way back to the v0.16 docs, Series.str.partition (https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.partition.html) has the signature Series.str.partition(pat=' ', expand=True), but the docs only talk about sep instead of pat.
3

I think the kwarg should be renamed to sep, which makes more sense for partitioning something than pat, which sounds like it's about a regex pattern.

Same thing applies to rpartition.

@artsiomkaltovich
Copy link

It is standard method https://docs.python.org/3/library/stdtypes.html#str.partition
The parameter is named sep there, but in Pandas implementation it is pat
https://github.com/pandas-dev/pandas/blob/v0.23.4/pandas/core/strings.py#L2382-L2391

I agree that parameter should be renamed, can I take this one?

@jbrockmendel jbrockmendel added Docs Deprecate Functionality to remove in pandas labels Sep 29, 2018
@h-vetinari
Copy link
Contributor Author

@ArtyomKaltovich

I agree that parameter should be renamed, can I take this one?

Sorry for the late reply, no reason you shouldn't tackle it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants