Skip to content

Commit 7463c4c

Browse files
Terji PetersenTerji Petersen
authored andcommitted
update whatsnew text
1 parent 65147e2 commit 7463c4c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/source/whatsnew/v2.0.0.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,10 @@ The new behavior, as for datetime64, either gives exactly the requested dtype or
316316
Empty DataFrames/Series will now default to have a ``RangeIndex``
317317
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
318318

319-
When users instantiate :class:`DataFrame` or :class:`Series` objects without specifying the axes (``index=None``
320-
and/or ``columns=None``), pandas infers the index type for them. Previously, when instantiating
321-
in such cases, and it was not possible to infer the index type from the passed-in ``data``,
322-
pandas used to infer the index to be a :class:`RangeIndex`, except when constructing an empty (length 0)
323-
``Series`` or ``DataFrame`` without specifying the axes (``index=None``, ``columns=None``)
324-
then it would return the axes as empty Indexes with object dtype. Now, the axes return an ``RangeIndex`` in that case also (:issue:`49572`).
319+
Before, constructing an empty (length 0) :class:`Series` or :class:`DataFrame` without
320+
specifying the axes (``index=None``, ``columns=None``) would return the axes as empty :class:`Index` with object dtype.
321+
322+
Now, the axes return an empty :class:`RangeIndex`.
325323

326324
*Previous behavior*:
327325

0 commit comments

Comments
 (0)