-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
pandas 2.2.1 introduce API changes, for example for groupby().first
, groupby().last
and series.argsort
#57631
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
Not sure about the The other change is expected as noted in https://pandas.pydata.org/docs/whatsnew/v2.2.1.html#other and detailed in #57102 cc @rhshadrach |
In pandas 2.2.1 (in comparison with 2.2.0) https://pandas.pydata.org/docs/reference/api/pandas.Series.argsort.html#pandas.Series.argsort has a new |
I see thanks for point that out. This PR introduced that change and was meant to give pandas 2.2.x potential compatibility with Numpy 2.0 when it comes out: #57057. Sorry for not documenting it in the what's new, but the new argument was made backward compatible and doesn't change the behavior of |
@mroeschke just to be sure, pandas patch releases only guarantee backward compatibility and not forward compatibility? |
I'm a little confused what forward compatible means in this context, but these changes will also apply to the next minor/major release (3.0) |
I mean a situation where, for example, the code is written with the new parameters existing for version 2.2.1, but the user encountered some kind of error and decided to run the same code on pandas 2.2.0 (where parameters may not yet exist). Can one expect the code to work? |
In the case of groupby first/last, the decision to add in 2.2.1 was made because we accidentally removed the ability of users to achieve the result with |
For this example, no |
@mroeschke @rhshadrach thanks for the clarification! I received answers to all the questions, I think the issue can be closed. |
This makes code written in Pandas 2.2.1 incompatible with 2.2.0.
Was this done by mistake or on purpose? As far as I know, Pandas follows the semver methodology and this change is unexpected for me.
The text was updated successfully, but these errors were encountered: