-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: Remove MultiIndex._get_grouper_for_level #49597
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
CLN: Remove MultiIndex._get_grouper_for_level #49597
Conversation
I think according to #49452 (comment), we would like this to return a |
I think so - the idea being that for a MultiIndex, the current implementation of |
Ok no problem. I'll push again today. Sorry for some reason I thought I'd read a conversation where the decision was to remove it entirely instead of raise. |
if its just a 1-liner, id suggest putting it in the base class method with a quick check
that way you can add |
Okay implemented as suggested in this last commit. But a few more comments/questions: It seems to me that |
Prior to #49373 they were used for MultiIndex, but now they no longer are. These can be removed - and doing so here would be great. |
* Categorical.reorder_categories perf * whatsnew
…#49594) * API: Index(object_dtype_bool_ndarray) retain object dtype * GH ref, test
* BUG: Series(index=[]) should have dtype=object * parametrize tests * accept dtype * fix Co-authored-by: Terji Petersen <[email protected]>
* CLN: collect fastpath in Series.__init__ * small clean Co-authored-by: Terji Petersen <[email protected]>
Enable Pylint statement import-self
…v#49592) * DEPR: Enforce DataFrame(list_with_categorical) deprecation * Update doc/source/whatsnew/v2.0.0.rst Co-authored-by: Matthew Roeschke <[email protected]> Co-authored-by: Matthew Roeschke <[email protected]>
…ons (pandas-dev#49551) * WIP * DEPR: Enforce deprecation of numeric_only=None in DataFrame aggregations * Partial reverts * numeric_only in generic/series, fixup * cleanup * Remove docs warning * fixups * Fixups
* add/timedeltas-seconds-documentation * Fix line lenght * fixing whitespace * fixing whitespace * fixing line lenght * Adding suggestions * Fixing single line error
* DEPR: date_range(closed) * Disallow partial slicing of missing * Review + failed test
…andas-dev#49615) * REGR: Better warning in pivot_table when dropping nuisance columns * type-hint fixups
* REGR: MultiIndex.join does not work for ea dtypes * Update base.py
…as-dev#49613) * BUG: groupby with sort=False still sorts an ordered categorical * Add versionchanged
… 1.5.0 (pandas-dev#49610) BUG: Use naive wall time to perform offsets datetime64 conversion
* API: make Timestamp/Timedelta _as_unit public as_unit * update test * update test * update tests * fix pyi typo * fixup * fixup
* DEPR: Enforce Series(float_with_nan, dtype=inty) * update asv * troubleshoot asv * suggested asv edit
…andas-dev#49628) DEPR: Disallow missing nesed label when indexing MultiIndex level
added the `git fetch upstream` command
…49556) * for pandas-dev#49508 changing Doc for DataFrame.astype added the series in input in the doc of DataFrame.astype * up * up2 * up3 * up4 * up5
* DEPR: Remove df.reduction(level) * test_*_consistency * Fix asv * Add issue ref
…das-dev#49622) * DEPR: Enforce default of numeric_only=False * Remove unused functions * Add versionchanged * Add Series.rank to whatsnew * newline in docs
* STYLE: fix pylint reimported warnings * fixup! STYLE: fix pylint reimported warnings
Looks like something went awry with pulling from main. In general, you should only need to do |
Ya my bad, I rebased my branch. I'm going to just start a new branch as suggested. While removing the args from the Index class it looks like _get_grouper_for_level is returning extra Nones as well. In a new clean branch I'll make all the changes I think can happen to clean up and you can tell me if I've gone too far? Unfortunately still haven't been able to run the tests locally. I'm using the docker container and panda-dev environment. Maybe a fresh pull etc and this will all be cleared up but to be sure, I should expect the tests to all pass locally right? Thank you! |
When I rebase, I first make sure all my changes are on origin (in case something goes wrong) and then do:
Then pick the first commit and squash the rest. Sometimes if there are interleaving changes you get conflicts that need to be manually resolved, but most of the time everything goes through cleanly.
Sounds good!
For the most part, yes. Sometimes there are flakey tests, but otherwise, if the CI is green and your dev environment was created based on what's currently in main then the tests should pass. |
Will open a new one shortly |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.