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 DataFrame.pivot_table. #12015

Merged
merged 5 commits into from
Oct 28, 2022

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Oct 27, 2022

Description

This PR adds the method DataFrame.pivot_table to enhance pandas API compatibility. It uses the exact same arguments as cudf.pivot_table but automatically supplies the first argument (a DataFrame).

Related: #11314

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@bdice bdice self-assigned this Oct 27, 2022
@github-actions github-actions bot added the Python Affects Python cuDF API. label Oct 27, 2022
@bdice bdice added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Oct 27, 2022
@bdice bdice marked this pull request as ready for review October 27, 2022 17:44
@bdice bdice requested a review from a team as a code owner October 27, 2022 17:44
@mroeschke
Copy link
Contributor

Should all the arguments that aren't supported and raise NotImplementedError be tested as well? https://github.com/rapidsai/cudf/pull/11314/files#diff-a3d6b9fab46a4b2a1de7c903eab52bda471251b40452b1ac172d9d02a35a8f2bR1341

@bdice
Copy link
Contributor Author

bdice commented Oct 27, 2022

Should all the arguments that aren't supported and raise NotImplementedError be tested as well? https://github.com/rapidsai/cudf/pull/11314/files#diff-a3d6b9fab46a4b2a1de7c903eab52bda471251b40452b1ac172d9d02a35a8f2bR1341

Since this code is a pure wrapper around the module-level function, I didn’t add any tests beyond some API parametrizations. We could do that for completeness but code coverage won’t change.

@mroeschke
Copy link
Contributor

Since this code is a pure wrapper around the module-level function, I didn’t add any tests beyond some API parametrizations. We could do that for completeness but code coverage won’t change.

SGTM

@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Base: 87.40% // Head: 88.15% // Increases project coverage by +0.74% 🎉

Coverage data is based on head (d0d4733) compared to base (f72c4ce).
Patch has no changes to coverable lines.

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

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-22.12   #12015      +/-   ##
================================================
+ Coverage         87.40%   88.15%   +0.74%     
================================================
  Files               133      133              
  Lines             21833    21981     +148     
================================================
+ Hits              19084    19378     +294     
+ Misses             2749     2603     -146     
Impacted Files Coverage Δ
python/strings_udf/strings_udf/__init__.py 84.31% <0.00%> (-12.57%) ⬇️
python/cudf/cudf/io/text.py 91.66% <0.00%> (-8.34%) ⬇️
python/cudf/cudf/core/_base_index.py 82.20% <0.00%> (-3.35%) ⬇️
python/strings_udf/strings_udf/_typing.py 94.73% <0.00%> (-1.06%) ⬇️
python/cudf/cudf/testing/dataset_generator.py 72.83% <0.00%> (-0.42%) ⬇️
python/dask_cudf/dask_cudf/core.py 73.72% <0.00%> (-0.41%) ⬇️
python/dask_cudf/dask_cudf/backends.py 84.90% <0.00%> (-0.37%) ⬇️
python/cudf/cudf/io/orc.py 92.94% <0.00%> (-0.09%) ⬇️
python/cudf/cudf/__init__.py 90.69% <0.00%> (ø)
python/cudf/cudf/core/udf/_ops.py 100.00% <0.00%> (ø)
... and 23 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@shwina
Copy link
Contributor

shwina commented Oct 28, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 1017045 into rapidsai:branch-22.12 Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants