question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DEPR Deprecate mapper argument in rename?

See original GitHub issue

xref https://github.com/pandas-dev/pandas/pull/40979#issuecomment-980063593

thanks @MarcoGorelli i realize now why this is convoluted, will be glad to remove this in 2.0

@jreback not sure I understand what you mean - as in, to remove mapper in 2.0 and only support the index= and columns= calls? (and hence, introduce a deprecation warning in time for 1.4)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
MarcoGorellicommented, Nov 29, 2021

What can be reverted are:

  • changes to Series.rename (can just revert them all, and change super().rename to super()._rename
  • the extra tests in pandas/tests/series/methods/test_rename.py are no longer necessary

Might be easier to do this manually rather than reverting a commit using git. Up to you though, if you open a PR I’ll take a look

0reactions
Varun270commented, Nov 29, 2021

What can be reverted are:

  • changes to Series.rename (can just revert them all, and change super().rename to super()._rename
  • the extra tests in pandas/tests/series/methods/test_rename.py are no longer necessary

Might be easier to do this manually rather than reverting a commit using git. Up to you though, if you open a PR I’ll take a look

Yeah, even I was thinking that manually doing these changes would be much easier for me. Will create a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Are there best/recommended practices to follow when ...
Here I define all of the old 'bad' versions that I want to produce deprecation warnings for. I followed the approach of the...
Read more >
Deprecation of relabeling dicts in groupby.agg brings many ...
I suppose there could be a names parameter added to agg which would take dictionary mapping the aggregating columns to their new names....
Read more >
Deprecated Engine Features - Docker Documentation
This page provides an overview of features that are deprecated in Engine. Changes in packaging, and supported (Linux) distributions are not included.
Read more >
What's new in 1.4.0 (January 22, 2022) - Pandas
Now the renaming checks if a.1 already exists when changing the name of the second column and jumps this index. The second column...
Read more >
Communicate lifecycle changes in your functions
On this page. Basics; Functions. Deprecate a function; Gradual deprecation; Rename a function; Supersede a function; Mark function as experimental. Arguments.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found