-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REGR: Resampler.aggregate fails when used with column selection #43410
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
Conversation
…oupby_agg_regr � Conflicts: � doc/source/whatsnew/v1.3.3.rst
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 @rhshadrach
# GH 42905 | ||
ts = Timestamp("2021-02-28 00:00:00") | ||
df = DataFrame({"class": ["beta"], "value": [69], "date": [ts]}) | ||
result = ( |
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.
nit. can you make the result assignment just the op under test.
.resample("M")["value"] | ||
.agg(["sum", "size"]) | ||
) | ||
index = pd.MultiIndex.from_tuples([("beta", ts)], names=["class", "date"]) |
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.
another nit. index
-> expected_index
or even okay to inline with the df creation as black generally tends to do a good job of making things readable
Thanks @simonjayhawkins - comments addressed. |
thanks @rhshadrach |
@meeseeksdev backport 1.3.x |
This comment has been minimized.
This comment has been minimized.
@rhshadrach can you put up the manual backport :-< |
This comment has been minimized.
This comment has been minimized.
@meeseeksdev backport 1.3.x |
…ed with column selection
…lumn selection (#43444) Co-authored-by: Richard Shadrach <[email protected]>
agg
on a resampled SeriesGroupBy #42905The method
resample._GroupByMixin._gotitem
callsThe selection (which ends up in kwargs in
__init__
) was being ignored.