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
+5
Original file line number
Diff line number
Diff line change
@@ -783,6 +783,11 @@ Other API changes
783
783
or :attr:`~DataFrame.iloc` (thus, ``df.loc[:, :]`` or ``df.iloc[:, :]``) now returns a
784
784
new DataFrame (shallow copy) instead of the original DataFrame, consistent with other
785
785
methods to get a full slice (for example ``df.loc[:]`` or ``df[:]``) (:issue:`49469`)
786
+
- The :class:`Series` and :class:`DataFrame` constructors will now return a shallow copy
787
+
(i.e. share data, but not attributes) when passed a Series and DataFrame,
788
+
respectively, and with the default of ``copy=False`` (and if no other keyword triggers
789
+
a copy). Previously, the new Series or DataFrame would share the index attribute (e.g.
790
+
``df.index = ...`` would also update the index of the parent or child) (:issue:`49523`)
786
791
- Disallow computing ``cumprod`` for :class:`Timedelta` object; previously this returned incorrect values (:issue:`50246`)
787
792
- :class:`DataFrame` objects read from a :class:`HDFStore` file without an index now have a :class:`RangeIndex` instead of an ``int64`` index (:issue:`51076`)
788
793
- Instantiating an :class:`Index` with an numeric numpy dtype with data containing :class:`NA` and/or :class:`NaT` now raises a ``ValueError``. Previously a ``TypeError`` was raised (:issue:`51050`)
0 commit comments