Skip to content

Commit cfbd267

Browse files
Terji PetersenTerji Petersen
Terji Petersen
authored and
Terji Petersen
committed
update whatsnew text
1 parent 36f3630 commit cfbd267

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
@@ -296,12 +296,10 @@ The new behavior, as for datetime64, either gives exactly the requested dtype or
296296
Empty DataFrames/Series will now default to have a ``RangeIndex``
297297
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298298

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

306304
*Previous behavior*:
307305

0 commit comments

Comments
 (0)