From 405bd7c4bf370b74fd198fd2d484f8244504c305 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 15 Nov 2021 16:30:59 +0100 Subject: [PATCH] BUG: fix timedelta floordiv with scalar float (correction of #44466) --- pandas/core/arrays/timedeltas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/arrays/timedeltas.py b/pandas/core/arrays/timedeltas.py index 91e90ebdb6253..2a2e59cfda5e9 100644 --- a/pandas/core/arrays/timedeltas.py +++ b/pandas/core/arrays/timedeltas.py @@ -651,7 +651,7 @@ def __floordiv__(self, other): # at this point we should only have numeric scalars; anything # else will raise - result = self._ndarray / other + result = self._ndarray // other freq = None if self.freq is not None: # Note: freq gets division, not floor-division