-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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(rust, python): add dt.quarter_start, dt.quarter_end, dt.year_start and dt.year_end #14513
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14513 +/- ##
==========================================
+ Coverage 81.14% 81.28% +0.13%
==========================================
Files 1362 1356 -6
Lines 174846 175938 +1092
Branches 2531 2522 -9
==========================================
+ Hits 141881 143010 +1129
+ Misses 32481 32444 -37
Partials 484 484 ☔ View full report in Codecov by Sentry. |
thanks - looks like it's on the right track, will do a full review next week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
All comments were addressed @MarcoGorelli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got a comment on the example, but the rest looks good to me
thanks @SozinM for updating - could you update the merge conflict please? It should just be a matter of passing |
d40288d
to
2cb7600
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @SozinM ! this looks close
Just a couple of minor comments and it should be good to go
@MarcoGorelli done :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, thanks @SozinM !
@alexander-beedie Hi! Would you like to review this? |
@MarcoGorelli could you suggest a person to ask for an additional review? |
Ahh, just spotted that it's already approved by @MarcoGorelli and you're just waiting for a merge. Looks like you need to rebase once more (there are currently some conflicts), and then we can take a final look and get it in👌 |
Add mock test Add mock documentation
Renamed MonthEnd and MonthStart to DateEnd and DateStart traits Combined Month, Quarter, and Year methods into single the trait Added docstrings for methods
Fixed docstring for end methods Added tests
Changed data for month_end and quarter_end to consistent for start methods
Co-authored-by: Marco Edward Gorelli <[email protected]>
Co-authored-by: Marco Edward Gorelli <[email protected]>
Co-authored-by: Stijn de Gooijer <[email protected]>
Co-authored-by: Orson Peters <[email protected]>
1635f4d
to
86a0755
Compare
@alexander-beedie Hi! |
@alexander-beedie soft bump |
Hi @c-peters and @stinodego, I randomly chose you to ask to take a look if you have free time :) |
Hi @ritchie46 maybe you will be able to help? |
I've felt a bit apprehensive pressing the merge button, because I'm not sure these methods are really that useful. Don't we already offer the right tools to do this yourself? E.g. from datetime import date
import polars as pl
df = pl.DataFrame({"date": [date(2024, 2, 29)]})
result = df.with_columns(
year_end=pl.date(year=pl.col("date").dt.year(), month=12, day=31)
)
print(result)
The API bloat just doesn't seem worth it. |
Okay, this PR got a little out of hand so I will close it. If somebody wants to pick it up - feel free to repurpose the code :) |
closes #14511