Skip to content

Commit aee3455

Browse files
topper-123phofl
andauthored
DOC: fix some issues (#51286)
Co-authored-by: Patrick Hoefler <[email protected]>
1 parent b8b647d commit aee3455

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/source/whatsnew/v2.0.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Below is a possibly non-exhaustive list of changes:
7171
e.g. ``Index([1, 2, 3])`` will have a ``int64`` dtype, which is the same as previously.
7272
2. The various numeric datetime attributes of :class:`DatetimeIndex` (:attr:`~DatetimeIndex.day`,
7373
:attr:`~DatetimeIndex.month`, :attr:`~DatetimeIndex.year` etc.) were previously in of
74-
dtype ``int64``, while they were ``int32`` for :class:`DatetimeArray`. They are now
74+
dtype ``int64``, while they were ``int32`` for :class:`arrays.DatetimeArray`. They are now
7575
``int32`` on ``DatetimeIndex`` also:
7676

7777
.. ipython:: python
@@ -612,7 +612,7 @@ Empty DataFrames/Series will now default to have a ``RangeIndex``
612612
Before, constructing an empty (where ``data`` is ``None`` or an empty list-like argument) :class:`Series` or :class:`DataFrame` without
613613
specifying the axes (``index=None``, ``columns=None``) would return the axes as empty :class:`Index` with object dtype.
614614

615-
Now, the axes return an empty :class:`RangeIndex`.
615+
Now, the axes return an empty :class:`RangeIndex` (:issue:`49572`).
616616

617617
*Previous behavior*:
618618

pandas/core/indexes/datetimes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ class DatetimeIndex(DatetimeTimedeltaMixin):
132132
Represented internally as int64, and which can be boxed to Timestamp objects
133133
that are subclasses of datetime and carry metadata.
134134
135+
.. versionchanged:: 2.0.0
136+
The various numeric date/time attributes (:attr:`~DatetimeIndex.day`,
137+
:attr:`~DatetimeIndex.month`, :attr:`~DatetimeIndex.year` etc.) now have dtype
138+
``int32``. Previously they had dtype ``int64``.
139+
135140
Parameters
136141
----------
137142
data : array-like (1-dimensional)

0 commit comments

Comments
 (0)