Skip to content

WIP/DEPR: Deprecate inplace=True #24063

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 1 commit into from
Closed

WIP/DEPR: Deprecate inplace=True #24063

wants to merge 1 commit into from

Conversation

datapythonista
Copy link
Member

@jreback can you take a look and let me know if you're happy with the way I'm deprecating inplace=True here? I need to repeat the same lots of time, so would be nice to have any changes requested here, and not when they need to be repeated 100 times. :)

@datapythonista datapythonista added the Deprecate Functionality to remove in pandas label Dec 3, 2018
@pep8speaks
Copy link

Hello @datapythonista! Thanks for submitting the PR.

@@ -1136,7 +1136,11 @@ def reset_index(self, level=None, drop=False, name=None, inplace=False):
values. Uses ``self.name`` by default. This argument is ignored
when `drop` is True.
inplace : bool, default False
Modify the Series in place (do not create a new object).
Update the caller instead of returning a new object.
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe want to update the Returns to say that inplace returns None

Update the caller instead of returning a new object.

.. deprecated:: 0.24.0
Use ``s = s.reset_index()`` instead of
Copy link
Contributor

Choose a reason for hiding this comment

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

looks ok, is this how we do it elsewhere?

@codecov
Copy link

codecov bot commented Dec 3, 2018

Codecov Report

Merging #24063 into master will decrease coverage by 49.86%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #24063       +/-   ##
===========================================
- Coverage   92.31%   42.44%   -49.87%     
===========================================
  Files         161      161               
  Lines       51562    51565        +3     
===========================================
- Hits        47599    21887    -25712     
- Misses       3963    29678    +25715
Flag Coverage Δ
#multiple ?
#single 42.44% <33.33%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/series.py 50.69% <33.33%> (-42.99%) ⬇️
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/core/categorical.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/tseries/plotting.py 0% <0%> (-100%) ⬇️
pandas/tseries/converter.py 0% <0%> (-100%) ⬇️
pandas/io/formats/html.py 0% <0%> (-97.98%) ⬇️
pandas/core/groupby/categorical.py 0% <0%> (-95.46%) ⬇️
pandas/io/sas/sas7bdat.py 0% <0%> (-91.17%) ⬇️
pandas/io/sas/sas_xport.py 0% <0%> (-90.15%) ⬇️
... and 120 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7bdf7c...77731c9. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Dec 3, 2018

Codecov Report

Merging #24063 into master will decrease coverage by 49.86%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #24063       +/-   ##
===========================================
- Coverage   92.31%   42.44%   -49.87%     
===========================================
  Files         161      161               
  Lines       51562    51565        +3     
===========================================
- Hits        47599    21887    -25712     
- Misses       3963    29678    +25715
Flag Coverage Δ
#multiple ?
#single 42.44% <33.33%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/series.py 50.69% <33.33%> (-42.99%) ⬇️
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/core/categorical.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/tseries/plotting.py 0% <0%> (-100%) ⬇️
pandas/tseries/converter.py 0% <0%> (-100%) ⬇️
pandas/io/formats/html.py 0% <0%> (-97.98%) ⬇️
pandas/core/groupby/categorical.py 0% <0%> (-95.46%) ⬇️
pandas/io/sas/sas7bdat.py 0% <0%> (-91.17%) ⬇️
pandas/io/sas/sas_xport.py 0% <0%> (-90.15%) ⬇️
... and 120 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7bdf7c...77731c9. Read the comment docs.

@datapythonista
Copy link
Member Author

Closing this for now, will reopen if makes sense after we finish discussing #16529.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants