From eb9f75b92e367ed659e66a923cc8612bf69238f0 Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 2 Apr 2025 00:47:40 +0100 Subject: [PATCH 1/2] BUG: OverflowError when fillna on DataFrame with a pd.Timestamp (pandas-dev#61208) --- doc/source/whatsnew/v3.0.0.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index e6fafc8b1b14c..d8ffdd9648de2 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -648,6 +648,7 @@ Datetimelike - Bug in :func:`date_range` where using a negative frequency value would not include all points between the start and end values (:issue:`56147`) - Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`) - Bug in :func:`tseries.frequencies.to_offset` would fail to parse frequency strings starting with "LWOM" (:issue:`59218`) +- Bug in :meth:`DataFrame.fillna` raising an `AssertionError` instead of `OutOfBoundsDatetime` when filling a `datetime64[ns]` column with an out-of-bounds timestamp (e.g., `'0001-01-01'`). Now correctly raises `OutOfBoundsDatetime`. (:issue:`61208`) - Bug in :meth:`DataFrame.min` and :meth:`DataFrame.max` casting ``datetime64`` and ``timedelta64`` columns to ``float64`` and losing precision (:issue:`60850`) - Bug in :meth:`Dataframe.agg` with df with missing values resulting in IndexError (:issue:`58810`) - Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` does not raise on Custom business days frequencies bigger then "1C" (:issue:`58664`) From d32acd0ba679d20124117c7ab8c1f425441f8d93 Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 2 Apr 2025 01:38:14 +0100 Subject: [PATCH 2/2] BUG: OverflowError when fillna on DataFrame with a pd.Timestamp (#61208) --- doc/source/whatsnew/v3.0.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index d8ffdd9648de2..b3f792decddd8 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -648,7 +648,7 @@ Datetimelike - Bug in :func:`date_range` where using a negative frequency value would not include all points between the start and end values (:issue:`56147`) - Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`) - Bug in :func:`tseries.frequencies.to_offset` would fail to parse frequency strings starting with "LWOM" (:issue:`59218`) -- Bug in :meth:`DataFrame.fillna` raising an `AssertionError` instead of `OutOfBoundsDatetime` when filling a `datetime64[ns]` column with an out-of-bounds timestamp (e.g., `'0001-01-01'`). Now correctly raises `OutOfBoundsDatetime`. (:issue:`61208`) +- Bug in :meth:`DataFrame.fillna` raising an ``AssertionError`` instead of ``OutOfBoundsDatetime`` when filling a ``datetime64[ns]`` column with an out-of-bounds timestamp (e.g., ``'0001-01-01'``). Now correctly raises ``OutOfBoundsDatetime``. (:issue:`61208`) - Bug in :meth:`DataFrame.min` and :meth:`DataFrame.max` casting ``datetime64`` and ``timedelta64`` columns to ``float64`` and losing precision (:issue:`60850`) - Bug in :meth:`Dataframe.agg` with df with missing values resulting in IndexError (:issue:`58810`) - Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` does not raise on Custom business days frequencies bigger then "1C" (:issue:`58664`)