-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
idxmax() not available on groupby anymore #5786
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
you can add to whitelist FYI you can always do df.groupby(...).apply(lambda x: x.idxmax()) |
@jreback I know, but for idxmax I think this is usefull enough to have to shortcut available. Plus, this will break existing code (as the example on SO shows that it is used). And I was just about to open an new issue about this, because it seems the
generates a
while in 0.12 it does work. It has to do I think with difference between SeriesGroupby and DataFrameGroupby with one column, as |
ok go ahead and do a or for adding idxmax/min to whitelist (and in the test for same) I'll look at the apply issue |
can u open the apply as a separate issue with a small example |
thanks for pr and issues! |
Add idxmax/idxmin to groupby dispatch whitelist (#5786)
Version 0.13.0 * tag 'v0.13.0': (817 commits) RLS: 0.13.0 final COMPAT: back compat for HDFStore with a Term DOC: fix minor doc build warnings TST: aggregate_item_by_item test failure (GH5782) DOC: minor doc updates BUG: remove convert_numeric=True from groupbys perform soft-conversion of numeric dtypes instead BUG: resolved GH5788 under numpy < 1.7 because vstack is odd with M8[ns] INT: allow internal errors in block construction to bubble up BUG: dont' coerce reductions in a groupby always to datetimes; only when we have actual Timestamps in the data (GH5788,GH5789) Add idxmax/idxmin to groupby dispatch whitelist (pandas-dev#5786) TST: ensure_clean needs to import nose to skipTest() BLD: print_versions get uname() via cross-platform API TST: ensure_clean skips test when fs doesn't support unicode (sparc) Update comparison_with_r.rst BUG: big endian timedelta fix (GH5779) TST: closes (GH5778), failing tests on non-little endian for stata (sparc) DOC: Mention rpy2 breakage in release notes BUG: setitem for iloc/loc with a slice on a Series (GH5771) BUG: regression in read_csv parser handling of usecols GH5766 TST: corner_case for read_csv with usecols GH5766 ...
Just saw an example in this SO question, the use of
idxmax()
on a groupby object:This worked in 0.12, but not anymore in 0.13 as it is not in the whitelist.
The text was updated successfully, but these errors were encountered: