Skip to content

Commit fce4664

Browse files
committed
Fix pandas-dev#61208: OverflowError when fillna on DataFrame with a pd.Timestamp
Now raises OutOfBoundsDatetime.
1 parent 56847c5 commit fce4664

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/internals/blocks.py

+2
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,8 @@ def putmask(self, mask, new) -> list[Block]:
17491749
try:
17501750
# Caller is responsible for ensuring matching lengths
17511751
values._putmask(mask, new)
1752+
except OutOfBoundsDatetime as e:
1753+
raise OutOfBoundsDatetime(str(e))
17521754
except (TypeError, ValueError):
17531755
if self.ndim == 1 or self.shape[0] == 1:
17541756
if isinstance(self.dtype, IntervalDtype):

0 commit comments

Comments
 (0)