-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Groupby transform cleanups #27467
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
Groupby transform cleanups #27467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Mostly stylistic comments
def test_transform_invalid_name_raises(): | ||
df = DataFrame(dict(a=[0, 1, 1, 2])) | ||
g = df.groupby(["a", "b", "b", "c"]) | ||
with pytest.raises(ValueError, match="not a valid function name"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you parametrize these instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's needed. Parameterize with one case is not useful, and as a smoke test there doesn't need to be more than one. Also lots of similar tests in this file.
Can you write release notes for each of the user-facing changes? If you merge master we should have a 0.26.0.rst now. |
…leanups1 * origin/master: DOC: Fix typos in docstrings for functions referring. (#27474)
this also needs a whatsnew note. I am not so concerned about the invalid case (e.g. .transform('foo')), but something that looked legitimate and maybe even did something, though it may have been wrong, is now raising |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks really good! just some small comments. ping on green.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. not sure what is failing, merge master and ping on green. (you can ignore the codecov)
…leanups1 * origin/master: (33 commits) TYPING: add type hints to pandas\io\formats\printing.py (#27579) TYPING: Partial typing of Categorical (#27318) REF: collect indexing methods (#27588) API: Add entrypoint for plotting (#27488) REF: implement module for shared constructor functions (#27551) CLN: more assorted cleanups (#27555) CLN: pandas\io\formats\format.py (#27577) TYPING: some type hints for core.dtypes.common (#27564) DEPR: remove .ix from tests/indexing/multiindex/test_ix.py (#27565) DEPR: remove .ix from tests/indexing/test_partial.py (#27566) TST: add regression test for slicing IntervalIndex MI level with scalars (#27572) DEPR: remove .ix from tests/indexing/multiindex/test_setitem.py (#27574) BUG: display.precision of negative complex numbers (#27511) Removed ABCs from pandas._typing (#27424) DEPR: remove .ix from tests/indexing/test_indexing.py (#27535) BUG: fix+test quantile with empty DataFrame, closes #23925 (#27436) BUG: maybe_convert_objects mixed datetimes and timedeltas (#27438) more type hints for io/formats/format.py (#27512) CLN: simplify join take call (#27531) BUG: Allow ensure_index to coerce nan to NaT with numpy object array and tz Timestamp (#27556) ...
@jreback green |
thanks @pilkibun |
👍 |
Related #27389 (several issues there)
closes #27486