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/DEPR: replace kwarg "pat" with "sep" in str.[r]partition #23767

Merged
merged 2 commits into from
Nov 20, 2018

Conversation

h-vetinari
Copy link
Contributor

@pep8speaks
Copy link

Hello @h-vetinari! Thanks for submitting the PR.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment otherwise lgtm

@@ -2410,8 +2410,11 @@ def rsplit(self, pat=None, n=-1, expand=False):

Parameters
----------
pat : str, default whitespace
sep : str, default whitespace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's still keep pat documented but with a deprecated directive

@WillAyd WillAyd added Deprecate Functionality to remove in pandas Strings String extension data type and string data labels Nov 18, 2018
String to split on.
pat : str, default whitespace
.. deprecated:: 0.24.0
Use ``sep`` instead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Do we need a newline after this or does it render OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this directive recently in https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.astype.html, and then took the code from:

.. deprecated:: 0.20.0

IOW, should be fine. :)

@h-vetinari
Copy link
Contributor Author

Failure is a flaky hypothesis test.

@jreback jreback added this to the 0.24.0 milestone Nov 19, 2018
@jreback
Copy link
Contributor

jreback commented Nov 19, 2018

looks fine, ex @WillAyd comments. @WillAyd pls add this to the list in #6581 as well. merge when ready.

@h-vetinari
Copy link
Contributor Author

@jreback @WillAyd
The feedback of @WillAyd is already incorporated.

@jreback jreback merged commit b2fe1c8 into pandas-dev:master Nov 20, 2018
@jreback
Copy link
Contributor

jreback commented Nov 20, 2018

thanks @h-vetinari

thoo added a commit to thoo/pandas that referenced this pull request Nov 20, 2018
…fixed

* upstream/master:
  DOC: more consistent flake8-commands in contributing.rst (pandas-dev#23724)
  DOC: Fixed the doctsring for _set_axis_name (GH 22895) (pandas-dev#22969)
  DOC: Improve GL03 message re: blank lines at end of docstrings. (pandas-dev#23649)
  TST: add tests for keeping dtype in Series.update (pandas-dev#23604)
  TST: For GH4861, Period and datetime in multiindex (pandas-dev#23776)
  TST: move .str-test to strings.py & parametrize it; precursor to pandas-dev#23582 (pandas-dev#23777)
  STY: isort tests/scalar, tests/tslibs, import libwindow instead of _window (pandas-dev#23787)
  BUG: fixed .str.contains(..., na=False) for categorical series (pandas-dev#22170)
  BUG: Maintain column order with groupby.nth (pandas-dev#22811)
  API/DEPR: replace kwarg "pat" with "sep" in str.[r]partition (pandas-dev#23767)
  CLN: Finish isort core (pandas-dev#23765)
  TST: Mark test_pct_max_many_rows with pytest.mark.single (pandas-dev#23799)
@h-vetinari h-vetinari deleted the depr_pat_partition branch November 20, 2018 06:35
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
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 Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC/DEPR: sep vs pat in series.str.partition
4 participants