Skip to content

Commit f6e5f0e

Browse files
Terji PetersenTerji Petersen
Terji Petersen
authored and
Terji Petersen
committed
update whatsnew text
1 parent 98148ba commit f6e5f0e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/source/whatsnew/v2.0.0.rst

+4-6
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,10 @@ The new behavior, as for datetime64, either gives exactly the requested dtype or
314314
Empty DataFrames/Series will now default to have a ``RangeIndex``
315315
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
316316

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

324322
*Previous behavior*:
325323

0 commit comments

Comments
 (0)