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

Drop unsupported method argument from nunique and distinct_count. #10411

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Mar 11, 2022

The APIs DataFrame.nunique, Series.nunique, and ColumnBase.distinct_count have a method argument. The pandas API for nunique does not have a method argument. This method argument was meant to distinguish distinct counts computed by sort/hash approaches, but there are two issues: only "sort" is supported as an input value, and the algorithm in libcudf actually uses a hash-based approach. To resolve this inconsistency and align with the pandas API, I have removed the method parameter from DataFrame.nunique, Series.nunique, and ColumnBase.distinct_count.

This is a breaking change but I don't think a deprecation is needed. The nunique feature was added in 22.04 via #10077, so it has not yet been released. The internal changes to distinct_count can be made without a deprecation.

@bdice bdice added Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function breaking Breaking change labels Mar 11, 2022
@bdice bdice requested a review from a team as a code owner March 11, 2022 01:25
@bdice bdice self-assigned this Mar 11, 2022
@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #10411 (ad90493) into branch-22.04 (b613394) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.04   #10411      +/-   ##
================================================
+ Coverage         86.13%   86.16%   +0.02%     
================================================
  Files               139      139              
  Lines             22460    22457       -3     
================================================
+ Hits              19347    19350       +3     
+ Misses             3113     3107       -6     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/column.py 89.16% <100.00%> (+0.17%) ⬆️
python/cudf/cudf/core/dataframe.py 93.57% <100.00%> (ø)
python/cudf/cudf/core/frame.py 91.72% <100.00%> (ø)
python/cudf/cudf/core/single_column_frame.py 97.01% <100.00%> (ø)
python/cudf/cudf/core/column/numerical.py 94.69% <0.00%> (-0.30%) ⬇️
python/cudf/cudf/core/column/string.py 88.39% <0.00%> (+0.12%) ⬆️
python/cudf/cudf/core/tools/datetimes.py 84.49% <0.00%> (+0.30%) ⬆️
python/cudf/cudf/core/groupby/groupby.py 91.92% <0.00%> (+0.43%) ⬆️
python/cudf/cudf/core/column/lists.py 90.56% <0.00%> (+0.47%) ⬆️

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 b613394...ad90493. Read the comment docs.

@galipremsagar galipremsagar added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Mar 11, 2022
@galipremsagar
Copy link
Contributor

@gpucibot merge

@rapids-bot rapids-bot bot merged commit c0f7fe6 into rapidsai:branch-22.04 Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge breaking Breaking change improvement Improvement / enhancement to an existing function Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants