-
-
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
depr(python): Deprecate dt.mean
/dt.median
in favor of mean
/median
#16888
Conversation
f19935e
to
801152c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16888 +/- ##
==========================================
- Coverage 81.41% 80.98% -0.43%
==========================================
Files 1425 1437 +12
Lines 187964 189053 +1089
Branches 2704 2704
==========================================
+ Hits 153022 153110 +88
- Misses 34445 35446 +1001
Partials 497 497 ☔ View full report in Codecov by Sentry. |
2df4869
to
e3596bf
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.
Thanks, I left some small comments.
py-polars/tests/unit/operations/namespaces/temporal/test_datetime.py
Outdated
Show resolved
Hide resolved
dt.mean
and dt.median
dt.mean
and dt.median
dt.mean
and dt.median
dt.mean
and dt.median
in favor of mean
and median
dt.mean
and dt.median
in favor of mean
and median
dt.mean
/dt.median
in favor of mean
/median
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.
Thanks for this! Took a while with the reviews to get everything in, but happy we have this one done now 👍
Thanks for the help Stijn! |
There is no good reason for these to be a namespace methods. The method on
Series/Expr
can determine the right result for the data type.Changes
Series
methodsdt.mean
anddt.median
. Users should useSeries.mean
orSeries.median
instead.Example
Before
After