From fc4203396b7127a4c127b92f9fb83a261b656d17 Mon Sep 17 00:00:00 2001 From: Matt Heeter Date: Sun, 18 Feb 2024 04:45:37 +0000 Subject: [PATCH 1/9] Added some comments to where the bug is occurring --- pandas/core/arrays/datetimes.py | 6 ++++-- pandas/tests/indexes/datetimes/test_datetime.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 29681539d146b..f109e1f967cd3 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -140,10 +140,12 @@ def f(self): if field.endswith(("start", "end")): freq = self.freq - month_kw = 12 + month_kw = 12 # Default to December, but doesn't distinguish between start or end if freq: kwds = freq.kwds - month_kw = kwds.get("startingMonth", kwds.get("month", 12)) + month_kw = kwds.get( + "startingMonth", kwds.get("month", 12) + ) # Gets the "startingMonth" if it exists, otherwise it returns 12 result = fields.get_start_end_field( values, field, self.freqstr, month_kw, reso=self._creso diff --git a/pandas/tests/indexes/datetimes/test_datetime.py b/pandas/tests/indexes/datetimes/test_datetime.py index f7fc64d4b0163..9b408c1dbef43 100644 --- a/pandas/tests/indexes/datetimes/test_datetime.py +++ b/pandas/tests/indexes/datetimes/test_datetime.py @@ -214,3 +214,17 @@ def test_BM_BQ_BY_deprecated(self, freq, expected_values, freq_depr): ) tm.assert_index_equal(result, expected) + + def test_is_year_start_MS(self): + # GH#57377 + idx = date_range("2023-11-01", periods=3, freq="MS") + result = idx.is_year_start + expected = np.array([False, False, True]) + tm.assert_numpy_array_equal(result, expected) + + def test_is_year_end_MS(self): + # GH#57377 + idx = date_range("2023-11-01", periods=3, freq="ME") + result = idx.is_year_end + expected = np.array([False, True, False]) + tm.assert_numpy_array_equal(result, expected) From 29ecfda6ec337c312b5cef89dc51b5c0ebf3e69e Mon Sep 17 00:00:00 2001 From: Matt Heeter Date: Sun, 18 Feb 2024 20:08:41 +0000 Subject: [PATCH 2/9] Potential fix, passed all potentially relevant tests --- pandas/_libs/tslibs/fields.pyx | 10 +++++----- pandas/core/arrays/datetimes.py | 6 ++---- pandas/tests/indexes/datetimes/test_datetime.py | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/pandas/_libs/tslibs/fields.pyx b/pandas/_libs/tslibs/fields.pyx index ff4fb4d635d17..76b4b08cd5a6e 100644 --- a/pandas/_libs/tslibs/fields.pyx +++ b/pandas/_libs/tslibs/fields.pyx @@ -255,8 +255,8 @@ def get_start_end_field( if (freqstr[0:2] in ["MS", "QS", "YS"]) or ( freqstr[1:3] in ["MS", "QS", "YS"]): - end_month = 12 if month_kw == 1 else month_kw - 1 - start_month = month_kw + end_month = 12# if month_kw == 1 else month_kw - 1 + start_month = 1#month_kw else: end_month = month_kw start_month = (end_month % 12) + 1 @@ -286,14 +286,14 @@ def get_start_end_field( out[i] = 1 else: - for i in range(count): - if dtindex[i] == NPY_NAT: + for i in range(count): # The loop that is causing the error + if dtindex[i] == NPY_NAT: # If this thing is a NaT (thinking this means not a time), assinging it a False in the return array and (essentially skipping it) out[i] = 0 continue pandas_datetime_to_datetimestruct(dtindex[i], reso, &dts) - if _is_on_month(dts.month, compare_month, modby) and dts.day == 1: + if _is_on_month(dts.month, compare_month, modby) and dts.day == 1: # is_on_month is supposed to check if the given month is part of the series (ie 1, 4, 7, and 10 for quarters, 1, for years, and 1-12 for months) and if the day is the first day of the month out[i] = 1 elif field in ["is_month_end", "is_quarter_end", "is_year_end"]: diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index f109e1f967cd3..29681539d146b 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -140,12 +140,10 @@ def f(self): if field.endswith(("start", "end")): freq = self.freq - month_kw = 12 # Default to December, but doesn't distinguish between start or end + month_kw = 12 if freq: kwds = freq.kwds - month_kw = kwds.get( - "startingMonth", kwds.get("month", 12) - ) # Gets the "startingMonth" if it exists, otherwise it returns 12 + month_kw = kwds.get("startingMonth", kwds.get("month", 12)) result = fields.get_start_end_field( values, field, self.freqstr, month_kw, reso=self._creso diff --git a/pandas/tests/indexes/datetimes/test_datetime.py b/pandas/tests/indexes/datetimes/test_datetime.py index 9b408c1dbef43..27d9668566c88 100644 --- a/pandas/tests/indexes/datetimes/test_datetime.py +++ b/pandas/tests/indexes/datetimes/test_datetime.py @@ -228,3 +228,17 @@ def test_is_year_end_MS(self): result = idx.is_year_end expected = np.array([False, True, False]) tm.assert_numpy_array_equal(result, expected) + + def test_is_quarter_start_MS(self): + # GH#57377 + idx = date_range("2023-11-01", periods=3, freq="MS") + result = idx.is_quarter_start + expected = np.array([False, False, True]) + tm.assert_numpy_array_equal(result, expected) + + def test_is_quarter_end_MS(self): + # GH#57377 + idx = date_range("2023-11-01", periods=3, freq="ME") + result = idx.is_quarter_end + expected = np.array([False, True, False]) + tm.assert_numpy_array_equal(result, expected) From 3302622cad54d7bbe0375ed97d44804207b21b05 Mon Sep 17 00:00:00 2001 From: Matt Heeter Date: Sun, 18 Feb 2024 22:15:37 +0000 Subject: [PATCH 3/9] Very likely fix --- pandas/_libs/tslibs/fields.pyx | 13 +++--- pandas/core/arrays/datetimes.py | 3 +- .../tests/indexes/datetimes/test_datetime.py | 28 ------------ .../indexes/datetimes/test_scalar_compat.py | 44 +++++++++++++++++++ 4 files changed, 53 insertions(+), 35 deletions(-) diff --git a/pandas/_libs/tslibs/fields.pyx b/pandas/_libs/tslibs/fields.pyx index 76b4b08cd5a6e..19fa0f48bf01b 100644 --- a/pandas/_libs/tslibs/fields.pyx +++ b/pandas/_libs/tslibs/fields.pyx @@ -253,13 +253,14 @@ def get_start_end_field( # month of year. Other offsets use month, startingMonth as ending # month of year. - if (freqstr[0:2] in ["MS", "QS", "YS"]) or ( - freqstr[1:3] in ["MS", "QS", "YS"]): - end_month = 12# if month_kw == 1 else month_kw - 1 - start_month = 1#month_kw - else: + if (freqstr[0:2] in ["QS", "YS"]) or ( # ["MS", "QS", "YS"] + freqstr[1:3] in ["QS", "YS"]): # ["MS", "QS", "YS"] + # According to the above comment, these are correct for start/end + end_month = 1 if month_kw == 12 else month_kw - 9 + start_month = month_kw + else: # In the case of a *E freqstr end_month = month_kw - start_month = (end_month % 12) + 1 + start_month = 1 if month_kw == 12 else month_kw - 9 else: end_month = 12 start_month = 1 diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 29681539d146b..fb510ce25a8a7 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -143,7 +143,8 @@ def f(self): month_kw = 12 if freq: kwds = freq.kwds - month_kw = kwds.get("startingMonth", kwds.get("month", 12)) + month_kw = kwds.get("startingMonth", kwds.get("month", month_kw)) # Gives the staring month index, 1 for January, 2 for February, etc. + # Different offsets use different keyword names, result = fields.get_start_end_field( values, field, self.freqstr, month_kw, reso=self._creso diff --git a/pandas/tests/indexes/datetimes/test_datetime.py b/pandas/tests/indexes/datetimes/test_datetime.py index 27d9668566c88..f7fc64d4b0163 100644 --- a/pandas/tests/indexes/datetimes/test_datetime.py +++ b/pandas/tests/indexes/datetimes/test_datetime.py @@ -214,31 +214,3 @@ def test_BM_BQ_BY_deprecated(self, freq, expected_values, freq_depr): ) tm.assert_index_equal(result, expected) - - def test_is_year_start_MS(self): - # GH#57377 - idx = date_range("2023-11-01", periods=3, freq="MS") - result = idx.is_year_start - expected = np.array([False, False, True]) - tm.assert_numpy_array_equal(result, expected) - - def test_is_year_end_MS(self): - # GH#57377 - idx = date_range("2023-11-01", periods=3, freq="ME") - result = idx.is_year_end - expected = np.array([False, True, False]) - tm.assert_numpy_array_equal(result, expected) - - def test_is_quarter_start_MS(self): - # GH#57377 - idx = date_range("2023-11-01", periods=3, freq="MS") - result = idx.is_quarter_start - expected = np.array([False, False, True]) - tm.assert_numpy_array_equal(result, expected) - - def test_is_quarter_end_MS(self): - # GH#57377 - idx = date_range("2023-11-01", periods=3, freq="ME") - result = idx.is_quarter_end - expected = np.array([False, True, False]) - tm.assert_numpy_array_equal(result, expected) diff --git a/pandas/tests/indexes/datetimes/test_scalar_compat.py b/pandas/tests/indexes/datetimes/test_scalar_compat.py index f766894a993a0..15fa6a680b4fa 100644 --- a/pandas/tests/indexes/datetimes/test_scalar_compat.py +++ b/pandas/tests/indexes/datetimes/test_scalar_compat.py @@ -328,3 +328,47 @@ def test_dti_is_month_start_custom(self): msg = "Custom business days is not supported by is_month_start" with pytest.raises(ValueError, match=msg): dti.is_month_start + + @pytest.mark.parametrize( + "timestamp, freq, periods, expected_values", + [ + ("2017-12-01", "MS", 3, np.array([False, True, False])), + ], + ) + def test_dti_is_year_start(self, timestamp, freq, periods, expected_values): + #GH57377 + result = date_range(timestamp, freq=freq, periods=periods).is_year_start + tm.assert_numpy_array_equal(result, expected_values) + + @pytest.mark.parametrize( + "timestamp, freq, periods, expected_values", + [ + ("2017-12-01", "ME", 3, np.array([True, False, False])), + ], + ) + def test_dti_is_year_end(self, timestamp, freq, periods, expected_values): + #GH57377 + result = date_range(timestamp, freq=freq, periods=periods).is_year_end + tm.assert_numpy_array_equal(result, expected_values) + + @pytest.mark.parametrize( + "timestamp, freq, periods, expected_values", + [ + ("2017-12-01", "MS", 3, np.array([False, True, False])), + ], + ) + def test_dti_is_quarter_start(self, timestamp, freq, periods, expected_values): + #GH57377 + result = date_range(timestamp, freq=freq, periods=periods).is_quarter_start + tm.assert_numpy_array_equal(result, expected_values) + + @pytest.mark.parametrize( + "timestamp, freq, periods, expected_values", + [ + ("2017-12-01", "ME", 3, np.array([True, False, False])), + ], + ) + def test_dti_is_quarter_end(self, timestamp, freq, periods, expected_values): + #GH57377 + result = date_range(timestamp, freq=freq, periods=periods).is_quarter_end + tm.assert_numpy_array_equal(result, expected_values) From 6e9be5b80c06af4cc4569174cada56f29cb1fd39 Mon Sep 17 00:00:00 2001 From: Matt Heeter Date: Sun, 18 Feb 2024 22:36:55 +0000 Subject: [PATCH 4/9] Reverted ro previous start/end scheme; added tests --- pandas/_libs/tslibs/fields.pyx | 21 ++++---- .../indexes/datetimes/test_scalar_compat.py | 52 +++++++++++++++---- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/pandas/_libs/tslibs/fields.pyx b/pandas/_libs/tslibs/fields.pyx index 19fa0f48bf01b..d7c4b650befcb 100644 --- a/pandas/_libs/tslibs/fields.pyx +++ b/pandas/_libs/tslibs/fields.pyx @@ -253,14 +253,15 @@ def get_start_end_field( # month of year. Other offsets use month, startingMonth as ending # month of year. - if (freqstr[0:2] in ["QS", "YS"]) or ( # ["MS", "QS", "YS"] - freqstr[1:3] in ["QS", "YS"]): # ["MS", "QS", "YS"] - # According to the above comment, these are correct for start/end - end_month = 1 if month_kw == 12 else month_kw - 9 - start_month = month_kw - else: # In the case of a *E freqstr + # According to the above comment, the first conditional is for QS and YS only + if (freqstr[0:2] in ["QS", "YS"]) or ( + freqstr[1:3] in ["QS", "YS"]): + end_month = 12 if month_kw == 1 else month_kw - 1 + start_month = month_kw + + else: end_month = month_kw - start_month = 1 if month_kw == 12 else month_kw - 9 + start_month = (end_month % 12) + 1 else: end_month = 12 start_month = 1 @@ -287,14 +288,14 @@ def get_start_end_field( out[i] = 1 else: - for i in range(count): # The loop that is causing the error - if dtindex[i] == NPY_NAT: # If this thing is a NaT (thinking this means not a time), assinging it a False in the return array and (essentially skipping it) + for i in range(count): + if dtindex[i] == NPY_NAT: out[i] = 0 continue pandas_datetime_to_datetimestruct(dtindex[i], reso, &dts) - if _is_on_month(dts.month, compare_month, modby) and dts.day == 1: # is_on_month is supposed to check if the given month is part of the series (ie 1, 4, 7, and 10 for quarters, 1, for years, and 1-12 for months) and if the day is the first day of the month + if _is_on_month(dts.month, compare_month, modby) and dts.day == 1: out[i] = 1 elif field in ["is_month_end", "is_quarter_end", "is_year_end"]: diff --git a/pandas/tests/indexes/datetimes/test_scalar_compat.py b/pandas/tests/indexes/datetimes/test_scalar_compat.py index 15fa6a680b4fa..c2a2ba39ce243 100644 --- a/pandas/tests/indexes/datetimes/test_scalar_compat.py +++ b/pandas/tests/indexes/datetimes/test_scalar_compat.py @@ -333,10 +333,12 @@ def test_dti_is_month_start_custom(self): "timestamp, freq, periods, expected_values", [ ("2017-12-01", "MS", 3, np.array([False, True, False])), + ("2017-12-01", "QS", 3, np.array([True, False, False])), + ("2017-12-01", "YS", 3, np.array([True, True, True])), ], ) - def test_dti_is_year_start(self, timestamp, freq, periods, expected_values): - #GH57377 + def test_dti_dr_is_year_start(self, timestamp, freq, periods, expected_values): + # GH57377 result = date_range(timestamp, freq=freq, periods=periods).is_year_start tm.assert_numpy_array_equal(result, expected_values) @@ -344,10 +346,12 @@ def test_dti_is_year_start(self, timestamp, freq, periods, expected_values): "timestamp, freq, periods, expected_values", [ ("2017-12-01", "ME", 3, np.array([True, False, False])), + ("2017-12-01", "QE", 3, np.array([True, False, False])), + ("2017-12-01", "YE", 3, np.array([True, True, True])), ], ) - def test_dti_is_year_end(self, timestamp, freq, periods, expected_values): - #GH57377 + def test_dti_dr_is_year_end(self, timestamp, freq, periods, expected_values): + # GH57377 result = date_range(timestamp, freq=freq, periods=periods).is_year_end tm.assert_numpy_array_equal(result, expected_values) @@ -355,10 +359,12 @@ def test_dti_is_year_end(self, timestamp, freq, periods, expected_values): "timestamp, freq, periods, expected_values", [ ("2017-12-01", "MS", 3, np.array([False, True, False])), + ("2017-12-01", "QS", 3, np.array([True, True, True])), + ("2017-12-01", "YS", 3, np.array([True, True, True])), ], - ) - def test_dti_is_quarter_start(self, timestamp, freq, periods, expected_values): - #GH57377 + ) + def test_dti_dr_is_quarter_start(self, timestamp, freq, periods, expected_values): + # GH57377 result = date_range(timestamp, freq=freq, periods=periods).is_quarter_start tm.assert_numpy_array_equal(result, expected_values) @@ -366,9 +372,37 @@ def test_dti_is_quarter_start(self, timestamp, freq, periods, expected_values): "timestamp, freq, periods, expected_values", [ ("2017-12-01", "ME", 3, np.array([True, False, False])), + ("2017-12-01", "QE", 3, np.array([True, True, True])), + ("2017-12-01", "YE", 3, np.array([True, True, True])), ], ) - def test_dti_is_quarter_end(self, timestamp, freq, periods, expected_values): - #GH57377 + def test_dti_dr_is_quarter_end(self, timestamp, freq, periods, expected_values): + # GH57377 result = date_range(timestamp, freq=freq, periods=periods).is_quarter_end tm.assert_numpy_array_equal(result, expected_values) + + @pytest.mark.parametrize( + "timestamp, freq, periods, expected_values", + [ + ("2017-12-01", "MS", 3, np.array([True, True, True])), + ("2017-12-01", "QS", 3, np.array([True, True, True])), + ("2017-12-01", "YS", 3, np.array([True, True, True])), + ], + ) + def test_dti_dr_is_month_start(self, timestamp, freq, periods, expected_values): + # GH57377 + result = date_range(timestamp, freq=freq, periods=periods).is_month_start + tm.assert_numpy_array_equal(result, expected_values) + + @pytest.mark.parametrize( + "timestamp, freq, periods, expected_values", + [ + ("2017-12-01", "ME", 3, np.array([True, True, True])), + ("2017-12-01", "QE", 3, np.array([True, True, True])), + ("2017-12-01", "YE", 3, np.array([True, True, True])), + ], + ) + def test_dti_dr_is_month_end(self, timestamp, freq, periods, expected_values): + # GH57377 + result = date_range(timestamp, freq=freq, periods=periods).is_month_end + tm.assert_numpy_array_equal(result, expected_values) From bd1d878b0d8d62a49b6fed3ec368ade426a10c03 Mon Sep 17 00:00:00 2001 From: Matt Heeter Date: Sun, 18 Feb 2024 23:47:56 +0000 Subject: [PATCH 5/9] Added fixes to whatsnew doc --- 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 23942106a6ffa..71a88796f8963 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -189,7 +189,7 @@ Categorical Datetimelike ^^^^^^^^^^^^ - Bug in :func:`date_range` where the last valid timestamp would sometimes not be produced (:issue:`56134`) -- +- Bug in :meth:`is_year_start` where a DateTimeIndex constructed via a date_range with frequency 'MS' wouldn't have the correct year or quarter start attributes (:issue:`57377`) Timedelta ^^^^^^^^^ From 6e4be2e25b8d7f0f6c107d658430f7566a3ce028 Mon Sep 17 00:00:00 2001 From: Matt Heeter Date: Mon, 19 Feb 2024 00:14:28 +0000 Subject: [PATCH 6/9] Removed stray comment --- pandas/core/arrays/datetimes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index fb510ce25a8a7..fbe4e25631e45 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -143,8 +143,7 @@ def f(self): month_kw = 12 if freq: kwds = freq.kwds - month_kw = kwds.get("startingMonth", kwds.get("month", month_kw)) # Gives the staring month index, 1 for January, 2 for February, etc. - # Different offsets use different keyword names, + month_kw = kwds.get("startingMonth", kwds.get("month", month_kw)) result = fields.get_start_end_field( values, field, self.freqstr, month_kw, reso=self._creso From 3c5fab0eafb51ad68805a1417610ebff794c6f0d Mon Sep 17 00:00:00 2001 From: Matt Heeter <94481579+mattheeter@users.noreply.github.com> Date: Mon, 22 Apr 2024 20:38:05 +0000 Subject: [PATCH 7/9] Fixed alphabetical problem in whatsnew --- 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 9558b6c1782ca..acf55c60feedc 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -356,9 +356,9 @@ Categorical Datetimelike ^^^^^^^^^^^^ +- Bug in :attr:`is_year_start` where a DateTimeIndex constructed via a date_range with frequency 'MS' wouldn't have the correct year or quarter start attributes (:issue:`57377`) - Bug in :class:`Timestamp` constructor failing to raise when ``tz=None`` is explicitly specified in conjunction with timezone-aware ``tzinfo`` or data (:issue:`48688`) - Bug in :func:`date_range` where the last valid timestamp would sometimes not be produced (:issue:`56134`) -- Bug in :meth:`is_year_start` where a DateTimeIndex constructed via a date_range with frequency 'MS' wouldn't have the correct year or quarter start attributes (:issue:`57377`) - Bug in :func:`date_range` where using a negative frequency value would not include all points between the start and end values (:issue:`56382`) - Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`) From 7f98a6a5f7533875147c97887e998aacd850e0a1 Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:35:38 +0100 Subject: [PATCH 8/9] add parametric test --- .../indexes/datetimes/test_scalar_compat.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pandas/tests/indexes/datetimes/test_scalar_compat.py b/pandas/tests/indexes/datetimes/test_scalar_compat.py index dd507985980a1..87251f35c755b 100644 --- a/pandas/tests/indexes/datetimes/test_scalar_compat.py +++ b/pandas/tests/indexes/datetimes/test_scalar_compat.py @@ -11,6 +11,8 @@ import locale import unicodedata +from hypothesis import given +import hypothesis.strategies as st import numpy as np import pytest @@ -421,3 +423,18 @@ def test_dti_is_year_start_freq_custom_business_day_with_digit(self): msg = "Custom business days is not supported by is_year_start" with pytest.raises(ValueError, match=msg): dr.is_year_start + + +@given( + dt=st.datetimes(min_value=datetime(1960, 1, 1), max_value=datetime(1980, 1, 1)), + n=st.integers(min_value=1, max_value=10), + freq=st.sampled_from(["MS", "QS", "YS"]), +) +@pytest.mark.slow +def test_against_scalar_parametric(freq, dt, n): + # https://github.com/pandas-dev/pandas/issues/49606 + freq = f"{n}{freq}" + d = date_range(dt, periods=3, freq=freq) + result = list(d.is_year_start) + expected = [x.is_year_start for x in d] + assert result == expected From 74f151e1a77d688dbf24bbcfa842c3c7ca0a59ef Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:37:13 +0100 Subject: [PATCH 9/9] fixup --- doc/source/whatsnew/v3.0.0.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index f7e11f1c70870..a8b5867389695 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -460,7 +460,6 @@ Datetimelike - 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`) - Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` returning ``False`` on double-digit frequencies (:issue:`58523`) -- Bug in :meth:`is_year_start` where a DateTimeIndex constructed via a date_range with frequency 'MS' wouldn't have the correct year or quarter start attributes (:issue:`57377`) - Bug in setting scalar values with mismatched resolution into arrays with non-nanosecond ``datetime64``, ``timedelta64`` or :class:`DatetimeTZDtype` incorrectly truncating those scalars (:issue:`56410`) Timedelta