Skip to content

Commit 3be623b

Browse files
jorisvandenbosscheTomAugspurger
authored andcommitted
Add epoch alternative to deprecation message (pandas-dev#21060)
1 parent dfb2651 commit 3be623b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/_libs/tslibs/timedeltas.pyx

+3
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,9 @@ class Timedelta(_Timedelta):
11961196
msg = textwrap.dedent("""\
11971197
Floor division between integer array and Timedelta is
11981198
deprecated. Use 'array // timedelta.value' instead.
1199+
If you want to obtain epochs from an array of timestamps,
1200+
you can rather use
1201+
'array - pd.Timestamp("1970-01-01")) // pd.Timedelta("1s")'.
11991202
""")
12001203
warnings.warn(msg, FutureWarning)
12011204
return other // self.value

0 commit comments

Comments
 (0)