Open SozinM opened 7 months ago
Discussed today - this would be good to have, isn't trivial for users to do themselves, and opens up for optimisation possibilities which might not be possible if users have to construct the result themselves
Looks like you've already opened a PR, feel free to ping when it's ready!
Thanks! I will do refactoring and tests now
@mcrumiller @MarcoGorelli Refactoring, Tests and docs are done. Few questions:
Wdyt about naming of
pub(crate) enum RollUnit { Month, Quarter, Year, }
- maybe there is better fitting name?
Is my approach to the separation of roll_backward into the general function and supplementary ones for specific cases good enough? Or maybe better to use some different approach?
Note: I changed module month_end, month_start to date_end, date_start so we could pack all end and start methods in there and not create new module for each new method.
Description
I need date_range capabilities similar to pandas to conveniently get week, quarter, and year starts and ends. I propose to implement quarter_start, quarter_end, year_start and year_end methods from pandas similarly to https://github.com/pola-rs/polars/pull/8435 PR for quarter and year implementation is: #14513 I will add tests and complete documentation once we discuss implementation details.
@mcrumiller and @MarcoGorelli could be interested as you were participating in the #8435