Skip to content
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

Add support for numeric_only in DataFrame._reduce #10629

Merged

Conversation

martinfalisse
Copy link
Contributor

@martinfalisse martinfalisse commented Apr 10, 2022

Add support for numeric_only in DataFrame._reduce, this way can use df.mean(numeric_only=True), etc. Resolves #2067. Also partially addresses #9009.

@martinfalisse martinfalisse requested a review from a team as a code owner April 10, 2022 13:55
@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

@github-actions github-actions bot added the Python Affects Python cuDF API. label Apr 10, 2022
@quasiben
Copy link
Member

ok to test

@codecov
Copy link

codecov bot commented Apr 11, 2022

Codecov Report

Merging #10629 (b434124) into branch-22.06 (bc43e6a) will increase coverage by 0.05%.
The diff coverage is 91.40%.

❗ Current head b434124 differs from pull request most recent head 9ca5d12. Consider uploading reports for the commit 9ca5d12 to get more accurate results

@@               Coverage Diff                @@
##           branch-22.06   #10629      +/-   ##
================================================
+ Coverage         86.31%   86.37%   +0.05%     
================================================
  Files               140      142       +2     
  Lines             22280    22356      +76     
================================================
+ Hits              19232    19309      +77     
+ Misses             3048     3047       -1     
Impacted Files Coverage Δ
python/cudf/cudf/core/algorithms.py 90.47% <ø> (ø)
python/cudf/cudf/core/groupby/groupby.py 91.72% <ø> (+0.22%) ⬆️
python/cudf/cudf/core/multiindex.py 92.14% <ø> (ø)
python/cudf/cudf/core/series.py 95.28% <ø> (ø)
python/cudf/cudf/utils/cudautils.py 59.83% <ø> (ø)
python/cudf/cudf/utils/ioutils.py 79.60% <ø> (ø)
python/cudf/cudf/utils/utils.py 90.28% <ø> (ø)
python/cudf/cudf/core/frame.py 93.67% <56.52%> (-1.09%) ⬇️
python/dask_cudf/dask_cudf/tests/utils.py 90.90% <90.90%> (ø)
python/cudf/cudf/core/column/lists.py 92.79% <100.00%> (+2.61%) ⬆️
... and 13 more

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 bc43e6a...9ca5d12. Read the comment docs.

@vyasr vyasr added 3 - Ready for Review Ready for review by team non-breaking Non-breaking change feature request New feature or request labels Apr 12, 2022
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch! I have a few small requests, then this should be good to go.

python/cudf/cudf/core/dataframe.py Outdated Show resolved Hide resolved
python/cudf/cudf/tests/test_dataframe.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/dataframe.py Outdated Show resolved Hide resolved
python/cudf/cudf/tests/test_stats.py Show resolved Hide resolved
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this LGTM!

@vyasr
Copy link
Contributor

vyasr commented Apr 14, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit f7c35d5 into rapidsai:branch-22.06 Apr 14, 2022
@martinfalisse martinfalisse deleted the numeric_only_df_reduce branch May 7, 2022 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team feature request New feature or request non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Use _get_numeric_types in numeric reductions
5 participants