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

fix: Fix DataFrame.top_k not handling nulls correctly #17239

Merged
merged 3 commits into from
Jun 27, 2024
Merged

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Jun 27, 2024

Fixes #17165.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jun 27, 2024
@@ -68,8 +68,8 @@ def test_top_k() -> None:
# dataframe
df = pl.DataFrame(
{
"a": [1, 2, 3, 4, 2, 2],
"b": [3, 2, 1, 4, 3, 2],
"a": [1, 2, 3, 4, 2, 2, None],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"a": [1, 2, 3, 4, 2, 2, None],
"a": [1, 2, 3, 4, 2, 2, None],

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.84%. Comparing base (4d2f928) to head (8b0c24c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17239      +/-   ##
==========================================
+ Coverage   80.82%   80.84%   +0.01%     
==========================================
  Files        1466     1466              
  Lines      192313   192308       -5     
  Branches     2745     2745              
==========================================
+ Hits       155446   155473      +27     
+ Misses      36364    36332      -32     
  Partials      503      503              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit b428ec3 into main Jun 27, 2024
26 checks passed
@ritchie46 ritchie46 deleted the top-k-df-fix branch June 27, 2024 11:51
@stinodego stinodego changed the title fix: top_k directly on dataframes fix: Fix DataFrame.top_k not handling nulls correctly Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFrame.top_k not handling nulls correctly in version 1.0.0-rc.1
3 participants