-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Breaking change to offsets.pyx - quarter offset classes #39890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d4428da
a546ddc
d564763
85ee259
8b4ed54
6e1f3c5
01ce09f
b95cc70
ccb9b97
f1204de
a8c8a3d
1338c1f
d7c8cad
3399d67
79fe747
2f456cb
3fd9a64
3ce1de9
7e1e5d2
f9e7c3b
27a24ba
197fa1b
8154be9
24afb65
2757983
dc55ee6
12cf5bf
8b91c5c
9b4f609
d1099a8
8892734
1cde76e
4e659a5
36df0f7
1ec3a9b
1a6bf2c
a8e47a4
cbce0bd
9506ee0
6a7b0db
bafe9d2
e5ad2ac
66d37b5
57fe350
e2665e0
94947d4
30ad2ff
9621c16
b9d6383
5b89343
6208287
ace4503
63a1152
f2410e7
bc0d0c6
f21921d
448e0da
fe07ea2
5b2ec3f
827ab65
f27b5ef
1441a29
7875614
688eaf6
c0f6d84
a5416a1
1d3d45d
22c779f
384cb82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -458,6 +458,36 @@ with a :class:`MultiIndex` in the result. This can lead to a perceived duplicati | |
df.groupby('label1').rolling(1).sum() | ||
|
||
|
||
.. _whatsnew_130.notable_bug_fixes.quarterbegin_default_anchor: | ||
|
||
Changed default periods in :class:`~pandas.tseries.offsets.QuarterBegin` and :class:`~pandas.tseries.offsets.BQuarterBegin` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to be the same length as the title, it should error if not |
||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Quarter-based time offset classes :class:`~pandas.tseries.offsets.QuarterEnd`, | ||
:class:`~pandas.tseries.offsets.QuarterBegin`, :class:`~pandas.tseries.offsets.BQuarterEnd`, | ||
:class:`~pandas.tseries.offsets.BQuarterBegin` now use ``month`` instead of ``startingMonth`` | ||
as a time anchor parameter (:issue:`5307`). The default value for :class:`~pandas.tseries.offsets.QuarterBegin` | ||
and :class:`~pandas.tseries.offsets.BQuarterBegin` is now 1 (January) instead of 3 (March), | ||
as a result these offsets are aligned with standard calendar quarters (:issue:`8435`). | ||
|
||
*pandas 1.2.x* | ||
|
||
.. code-block:: ipython | ||
|
||
In [1]: pd.Timestamp(2014, 10, 10) + pd.tseries.offsets.QuarterBegin() | ||
Out[2]: Timestamp('2014-12-01 00:00:00') | ||
In [3]: pd.Timestamp(2014, 10, 10) + pd.tseries.offsets.BQuarterBegin() | ||
Out[4]: Timestamp('2014-12-01 00:00:00') | ||
|
||
*pandas 1.3.0* | ||
|
||
.. code-block:: ipython | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't use a code-block, rather an ipython block for the new behavior |
||
|
||
In [1]: pd.Timestamp(2014, 10, 10) + pd.tseries.offsets.QuarterBegin() | ||
Out[2]: Timestamp('2015-01-01 00:00:00') | ||
In [3]: pd.Timestamp(2014, 10, 10) + pd.tseries.offsets.BQuarterBegin() | ||
Out[4]: Timestamp('2015-01-01 00:00:00') | ||
|
||
.. _whatsnew_130.api_breaking.deps: | ||
|
||
Increased minimum versions for dependencies | ||
|
@@ -570,6 +600,7 @@ Deprecations | |
- Deprecated allowing partial failure in :meth:`Series.transform` and :meth:`DataFrame.transform` when ``func`` is list-like or dict-like and raises anything but ``TypeError``; ``func`` raising anything but a ``TypeError`` will raise in a future version (:issue:`40211`) | ||
- Deprecated support for ``np.ma.mrecords.MaskedRecords`` in the :class:`DataFrame` constructor, pass ``{name: data[name] for name in data.dtype.names}`` instead (:issue:`40363`) | ||
- Deprecated the use of ``**kwargs`` in :class:`.ExcelWriter`; use the keyword argument ``engine_kwargs`` instead (:issue:`40430`) | ||
- Deprecated the ``startingMonth`` keyword in quarter-based offsets :class:`QuarterBegin`, :class:`QuarterEnd`, :class:`BQuarterBegin`, :class:`BQuarterEnd`; use ``month`` instead (:issue:`5307`) | ||
- Deprecated the ``level`` keyword for :class:`DataFrame` and :class:`Series` aggregations; use groupby instead (:issue:`39983`) | ||
|
||
.. --------------------------------------------------------------------------- | ||
|
@@ -625,6 +656,7 @@ Datetimelike | |
- Bug in :meth:`Timedelta.round`, :meth:`Timedelta.floor`, :meth:`Timedelta.ceil` for values near the implementation bounds of :class:`Timedelta` (:issue:`38964`) | ||
- Bug in :func:`date_range` incorrectly creating :class:`DatetimeIndex` containing ``NaT`` instead of raising ``OutOfBoundsDatetime`` in corner cases (:issue:`24124`) | ||
- Bug in :func:`infer_freq` incorrectly fails to infer 'H' frequency of :class:`DatetimeIndex` if the latter has a timezone and crosses DST boundaries (:issue:`39556`) | ||
- Bug in offsets :class:`QuarterBegin` and :class:`BQuarterBegin` returning days that are not conventional quarter beginnings (:issue:`8435`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't this a duplicate of the above section? |
||
|
||
Timedelta | ||
^^^^^^^^^ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to say deprecation about the
startingMonth
as its mentioned below as well. I would prefer making these 2 distinct and unrelated changes (which they are). so don't mention deprecation at all here.