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: Incorrect mode for sorted input #18945

Merged
merged 2 commits into from
Sep 26, 2024
Merged

fix: Incorrect mode for sorted input #18945

merged 2 commits into from
Sep 26, 2024

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Sep 26, 2024

Fixes the following:

>>> df = pl.DataFrame({"a": [1, 1, 2]})
>>> df.select(pl.col.a.mode())
shape: (1, 1)
┌─────┐
│ a   │
│ --- │
│ i64 │
╞═════╡
│ 1   │
└─────┘
>>> df.set_sorted("a").select(pl.col.a.mode())
shape: (1, 1)
┌─────┐
│ a   │
│ --- │
│ i64 │
╞═════╡
│ 2   │
└─────┘

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Sep 26, 2024
@ritchie46 ritchie46 merged commit 71a8b05 into pola-rs:main Sep 26, 2024
24 checks passed
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.86%. Comparing base (aec911f) to head (bdc29ec).
Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-ops/src/chunked_array/mode.rs 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18945      +/-   ##
==========================================
- Coverage   79.86%   79.86%   -0.01%     
==========================================
  Files        1522     1522              
  Lines      206951   206958       +7     
  Branches     2906     2906              
==========================================
+ Hits       165289   165293       +4     
- Misses      41114    41117       +3     
  Partials      548      548              

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

@c-peters c-peters added the accepted Ready for implementation label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants