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

feat: let rolling accept index_column of type UInt32 or UInt64 #14669

Merged
merged 4 commits into from
Feb 24, 2024

Conversation

MarcoGorelli
Copy link
Collaborator

@MarcoGorelli MarcoGorelli commented Feb 24, 2024

closes #7360

This one's been bugging me for a while, not being able to just do df.with_row_index().rolling("index", period="2i") and instead having to do df.with_row_index().rolling(pl.col("index").cast(pl.Int64), period="2i")

The result index should be the same as the input, so the cast back to an unsigned integer should always work without surprises

@MarcoGorelli MarcoGorelli changed the title Rolling uint feat: let rolling accept index_column of type UInt32 or UInt64 Feb 24, 2024
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Feb 24, 2024
Copy link

codecov bot commented Feb 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.78%. Comparing base (849953b) to head (95a0f8e).

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14669      +/-   ##
==========================================
- Coverage   80.79%   80.78%   -0.01%     
==========================================
  Files        1326     1326              
  Lines      173249   173249              
  Branches     2456     2456              
==========================================
- Hits       139976   139963      -13     
- Misses      32800    32813      +13     
  Partials      473      473              

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

Copy link
Member

@ritchie46 ritchie46 left a comment

Choose a reason for hiding this comment

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

Yeap, easy enough. :)

@ritchie46 ritchie46 merged commit 06cfb51 into pola-rs:main Feb 24, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use "i" rolling/dynamic groupby with uint
2 participants