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

docs: Update by param description for rolling_*_by functions #19715

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MarcoGorelli
Copy link
Collaborator

closes #19491

@MarcoGorelli MarcoGorelli changed the title docs: update by docs for rolling_*_by functions docs: Update by docs for rolling_*_by functions Nov 10, 2024
@MarcoGorelli MarcoGorelli changed the title docs: Update by docs for rolling_*_by functions docs: Update by param description for rolling_*_by functions Nov 10, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Nov 10, 2024
@MarcoGorelli MarcoGorelli marked this pull request as ready for review November 10, 2024 10:11
Copy link
Collaborator

@rodrigogiraoserrao rodrigogiraoserrao left a comment

Choose a reason for hiding this comment

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

I'm assuming the types (U)Int32 / (U)Int64 are allowed because they can be interpreted as a timestamp (number of some-fraction-of-a-second since epoch), right?
Would it make sense to add a note regarding that?
Someone might be left thinking that (U)Ints of smaller precisions could still work and we just forgot to add them to the docstring..?

Dunno, just asking. Feel free to ignore 😬

@MarcoGorelli
Copy link
Collaborator Author

thanks for your review - they're allowed because you pass 'i' to mean "index count" to window_size, e.g. pl.col('price').rolling_mean_by('index', '3i')

@rodrigogiraoserrao
Copy link
Collaborator

Ah I see. Then the docstrings should probably say something about the i / index count, but that's maybe for another PR; i.e., not necessarily your responsibility here

@MarcoGorelli
Copy link
Collaborator Author

it's ok i can add it, thanks!

@MarcoGorelli MarcoGorelli marked this pull request as draft November 11, 2024 12:03
@MarcoGorelli MarcoGorelli marked this pull request as ready for review December 1, 2024 14:51
Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.53%. Comparing base (1f104f9) to head (8a2e203).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #19715   +/-   ##
=======================================
  Coverage   79.53%   79.53%           
=======================================
  Files        1563     1563           
  Lines      217124   217124           
  Branches     2464     2464           
=======================================
+ Hits       172680   172694   +14     
+ Misses      43884    43870   -14     
  Partials      560      560           

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

Copy link
Collaborator

@rodrigogiraoserrao rodrigogiraoserrao left a comment

Choose a reason for hiding this comment

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

Thanks for making the docs clearer! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rolling_*_by() functions work when by is integer while docs say it shouldn't
2 participants