You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v2.0.0.rst
+2-2
Original file line number
Diff line number
Diff line change
@@ -300,7 +300,7 @@ When users don't specify indexes or columns when instantiating :class:`DataFrame
300
300
objects, pandas infers the index type for them. Previously, if it was not possible to
301
301
infer the index type from the data, pandas used to infer the index to be a :class:`RangeIndex`,
302
302
except when the frame/series was empty, then the index was inferred to be an :class:`Index`
303
-
with dtype `object`.
303
+
with dtype ``object``.
304
304
305
305
This has been changed, so the type of index/columns will always be :class:`RangeIndex`,
306
306
when users don't declare the index and it's not possible to infer the index type from the data (:issue:`49572`).
@@ -382,7 +382,7 @@ Other API changes
382
382
- :func:`read_stata` with parameter ``index_col`` set to ``None`` (the default) will now set the index on the returned :class:`DataFrame` to a :class:`RangeIndex` instead of a :class:`Int64Index` (:issue:`49745`)
383
383
- Changed behavior of :class:`Index` constructor with an object-dtype ``numpy.ndarray`` containing all-``bool`` values or all-complex values, this will now retain object dtype, consistent with the :class:`Series` behavior (:issue:`49594`)
384
384
- Changed behavior of :meth:`DataFrame.shift` with ``axis=1``, an integer ``fill_value``, and homogeneous datetime-like dtype, this now fills new columns with integer dtypes instead of casting to datetimelike (:issue:`49842`)
385
-
- Changed behavior of :func:`read_csv`, :func:`read_json` & :func:`read_fwf`, where the index will now always be a :class:`RangeIndex`, when no index is specified. Previously the index would be a :class:`Index` with dtype `object` if the new DataFrame/Series had length 0 (:issue:`49572`)
385
+
- Changed behavior of :func:`read_csv`, :func:`read_json` & :func:`read_fwf`, where the index will now always be a :class:`RangeIndex`, when no index is specified. Previously the index would be a :class:`Index` with dtype ``object`` if the new DataFrame/Series had length 0 (:issue:`49572`)
386
386
- :meth:`DataFrame.values`, :meth:`DataFrame.to_numpy`, :meth:`DataFrame.xs`, :meth:`DataFrame.reindex`, :meth:`DataFrame.fillna`, and :meth:`DataFrame.replace` no longer silently consolidate the underlying arrays; do ``df = df.copy()`` to ensure consolidation (:issue:`49356`)
0 commit comments