-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Add epoch alternative to deprecation message #21060
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
Add epoch alternative to deprecation message #21060
Conversation
pandas/_libs/tslibs/timedeltas.pyx
Outdated
@@ -1196,6 +1196,9 @@ class Timedelta(_Timedelta): | |||
msg = textwrap.dedent("""\ | |||
Floor division between integer array and Timedelta is | |||
deprecated. Use 'array // timedelta.value' instead. | |||
If you want to obtain epochs from an array of timestamps, | |||
you can rather use | |||
'array - pd.Timestamp("1970-01-01")) // pd.Timedelta('1s')'. |
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.
maybe double quotes for the Timedelta('1s')
just for clarity
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.
done
Codecov Report
@@ Coverage Diff @@
## master #21060 +/- ##
=======================================
Coverage 91.82% 91.82%
=======================================
Files 153 153
Lines 49503 49503
=======================================
Hits 45458 45458
Misses 4045 4045
Continue to review full report at Codecov.
|
…s-dev#21170) (cherry picked from commit cd04471)
cfr #21036 (comment)