Skip to content

DOC: improve DataFrame/SeriesGroupBy.apply doc string #18534

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

Conversation

topper-123
Copy link
Contributor

  • [x ] passes git diff upstream/master -u -- "*.py" | flake8 --diff

The doc strings for the apply method on GroupBy objects are currently IMO difficult to "translate" into working code. This PR proposes making the doc string more practical, including:

  • split the doc string up for dataframe and series GroupBy object
  • have some working examples
  • advice people to use other methods if possible because of speed penalty.

@topper-123 topper-123 force-pushed the improve_GroupBy.apply_doc_string branch from fa22906 to 55ea94a Compare November 27, 2017 23:56
@topper-123 topper-123 force-pushed the improve_GroupBy.apply_doc_string branch from 55ea94a to 675ef93 Compare November 28, 2017 00:11
@codecov
Copy link

codecov bot commented Nov 28, 2017

Codecov Report

Merging #18534 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18534      +/-   ##
==========================================
- Coverage   91.35%   91.33%   -0.02%     
==========================================
  Files         164      164              
  Lines       49801    49804       +3     
==========================================
- Hits        45494    45488       -6     
- Misses       4307     4316       +9
Flag Coverage Δ
#multiple 89.13% <100%> (ø) ⬆️
#single 40.81% <100%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/groupby.py 92.04% <100%> (+0.01%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.81% <0%> (-0.1%) ⬇️

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 88ab693...675ef93. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 28, 2017

Codecov Report

Merging #18534 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18534      +/-   ##
==========================================
- Coverage   91.35%   91.33%   -0.02%     
==========================================
  Files         164      164              
  Lines       49801    49804       +3     
==========================================
- Hits        45494    45488       -6     
- Misses       4307     4316       +9
Flag Coverage Δ
#multiple 89.13% <100%> (ø) ⬆️
#single 40.81% <100%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/groupby.py 92.04% <100%> (+0.01%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.81% <0%> (-0.1%) ⬇️

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 88ab693...675ef93. Read the comment docs.

@jreback jreback modified the milestones: 0.22.0, 0.21.1 Nov 28, 2017
@jreback jreback merged commit 2a0e54b into pandas-dev:master Nov 28, 2017
@jreback
Copy link
Contributor

jreback commented Nov 28, 2017

thanks!

@topper-123 topper-123 deleted the improve_GroupBy.apply_doc_string branch November 28, 2017 13:41
@topper-123
Copy link
Contributor Author

topper-123 commented Nov 28, 2017

Thanks and thanks for all the help, you're giving!

When is 0.21.1 planned for release?

TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request Dec 8, 2017
TomAugspurger pushed a commit that referenced this pull request Dec 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants