Skip to content

ENH: Let Resampler objects have a pipe method #18940

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

Merged
merged 1 commit into from
Dec 26, 2017

Conversation

topper-123
Copy link
Contributor

@topper-123 topper-123 commented Dec 25, 2017

Currently, calls to df.resample(....).pipe(...) are converted to df.resample(....).mean().pipe(...) and a warning is emitted (see #17905).

This PR solves this by moving the pipe method from the GroupBy class to the _GroupBy class. As _GroupBy is a common parent class of both GroupBy and Resampler, the pipe method is now available for Resampler too.

See also #17871.

@codecov
Copy link

codecov bot commented Dec 25, 2017

Codecov Report

Merging #18940 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18940      +/-   ##
==========================================
+ Coverage   91.59%   91.59%   +<.01%     
==========================================
  Files         150      150              
  Lines       48959    48964       +5     
==========================================
+ Hits        44845    44850       +5     
  Misses       4114     4114
Flag Coverage Δ
#multiple 89.96% <100%> (ø) ⬆️
#single 41.13% <75%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/resample.py 96.36% <100%> (+0.01%) ⬆️
pandas/core/groupby.py 92.08% <100%> (ø) ⬆️
pandas/plotting/_converter.py 66.95% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee9c7e9...30f91be. Read the comment docs.

@topper-123 topper-123 force-pushed the Resampler_pipe branch 2 times, most recently from 5ec26be to b6f8834 Compare December 26, 2017 02:02
@topper-123 topper-123 changed the title ENH/BUG: Let Resampler objects have a pipe method ENH: Let Resampler objects have a pipe method Dec 26, 2017
@jreback jreback added Enhancement Resample resample method labels Dec 26, 2017
@jreback jreback added this to the 0.23.0 milestone Dec 26, 2017
@jreback jreback merged commit a088c7b into pandas-dev:master Dec 26, 2017
@jreback
Copy link
Contributor

jreback commented Dec 26, 2017

nice @topper-123 thanks!

@topper-123 topper-123 deleted the Resampler_pipe branch December 26, 2017 22:11
hexgnu pushed a commit to hexgnu/pandas that referenced this pull request Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: .pipe on Resampler
2 participants