-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR Deprecate mapper argument in rename? #44627
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
Comments
no what u mean is to fix the structure of the impl here |
OK, so rename
? Like this, If so, I think that could be done straight away, rather than having to wait for 2.0, it wouldn't alter anything user-facing |
yeah i think that's right. its not worth trying to shoe-horn this in for methods which have a different signatture in series vs dataframe just to placate mypy, better to just have the impl be private. |
@MarcoGorelli I tried to understand this issue and so far I understood that in |
Hey @Varun270 ! So, there's a few things to do:
def rename(
self,
index=None,
*,
axis=None,
copy=True,
inplace=False,
level=None,
errors="ignore",
) -> Series | None: If you open a PR (even if you're not sure about everything) and tag me I can help you along with this |
I understood the first two points but will require your guidance on 3rd point as I don't know how can I revert changes done by someone else. |
Currently in def rename(
self,
index=None,
*,
axis=None,
copy=True,
inplace=False,
level=None,
errors="ignore",
): So after reverting it would look like this - def rename(
self,
index=None,
*,
axis=None,
copy=True,
inplace=False,
level=None,
errors="ignore",
) -> Series | None: Is that what you are saying? |
Make sure to pull the latest changes, it doesn't quite look like that at the moment. Anyway,
Yes, it should look like that at the end |
Okay, so I guess I would have to revert the changes first then rename the |
it's up to you how you do it |
Alright, will do it! |
@MarcoGorelli I found the commit that needed to be reverted but you have done some other changes in that commit apart from adding args to function |
What can be reverted are:
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. |
xref #40979 (comment)
@jreback not sure I understand what you mean - as in, to remove
mapper
in 2.0 and only support theindex=
andcolumns=
calls? (and hence, introduce a deprecation warning in time for 1.4)The text was updated successfully, but these errors were encountered: