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/v0.25.0.rst
+44-4
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ including other versions of pandas.
19
19
Other Enhancements
20
20
^^^^^^^^^^^^^^^^^^
21
21
22
+
- Added support for ISO week year format ('%G-%V-%u') when parsing datetimes using :meth: `to_datetime` (:issue:`16607`)
22
23
- Indexing of ``DataFrame`` and ``Series`` now accepts zerodim ``np.ndarray`` (:issue:`24919`)
23
24
- :meth:`Timestamp.replace` now supports the ``fold`` argument to disambiguate DST transition times (:issue:`25017`)
24
25
- :meth:`DataFrame.at_time` and :meth:`Series.at_time` now support :meth:`datetime.time` objects with timezones (:issue:`24043`)
@@ -27,6 +28,7 @@ Other Enhancements
27
28
- :meth:`DatetimeIndex.union` now supports the ``sort`` argument. The behaviour of the sort parameter matches that of :meth:`Index.union` (:issue:`24994`)
28
29
- :meth:`DataFrame.rename` now supports the ``errors`` argument to raise errors when attempting to rename nonexistent keys (:issue:`13473`)
29
30
- :class:`RangeIndex` has gained :attr:`~RangeIndex.start`, :attr:`~RangeIndex.stop`, and :attr:`~RangeIndex.step` attributes (:issue:`25710`)
31
+
- :class:`datetime.timezone` objects are now supported as arguments to timezone methods and constructors (:issue:`25065`)
30
32
31
33
.. _whatsnew_0250.api_breaking:
32
34
@@ -65,6 +67,42 @@ is respected in indexing. (:issue:`24076`, :issue:`16785`)
When passed DataFrames whose values are sparse, :func:`concat` will now return a
74
+
Series or DataFrame with sparse values, rather than a ``SparseDataFrame`` (:issue:`25702`).
75
+
76
+
.. ipython:: python
77
+
78
+
df = pd.DataFrame({"A": pd.SparseArray([0, 1])})
79
+
80
+
*Previous Behavior:*
81
+
82
+
.. code-block:: ipython
83
+
84
+
In [2]: type(pd.concat([df, df]))
85
+
pandas.core.sparse.frame.SparseDataFrame
86
+
87
+
*New Behavior:*
88
+
89
+
.. ipython:: python
90
+
91
+
type(pd.concat([df, df]))
92
+
93
+
94
+
This now matches the existing behavior of :class:`concat` on ``Series`` with sparse values.
95
+
:func:`concat` will continue to return a ``SparseDataFrame`` when all the values
96
+
are instances of ``SparseDataFrame``.
97
+
98
+
This change also affects routines using :func:`concat` internally, like :func:`get_dummies`,
99
+
which now returns a :class:`DataFrame` in all cases (previously a ``SparseDataFrame`` was
100
+
returned if all the columns were dummy encoded, and a :class:`DataFrame` otherwise).
101
+
102
+
Providing any ``SparseSeries`` or ``SparseDataFrame`` to :func:`concat` will
103
+
cause a ``SparseSeries`` or ``SparseDataFrame`` to be returned, as before.
104
+
105
+
68
106
.. _whatsnew_0250.api_breaking.deps:
69
107
70
108
Increased minimum versions for dependencies
@@ -137,10 +175,7 @@ Performance Improvements
137
175
138
176
Bug Fixes
139
177
~~~~~~~~~
140
-
- Bug in :func:`to_datetime` which would raise an (incorrect) ``ValueError`` when called with a date far into the future and the ``format`` argument specified instead of raising ``OutOfBoundsDatetime`` (:issue:`23830`)
141
-
- Bug in an error message in :meth:`DataFrame.plot`. Improved the error message if non-numerics are passed to :meth:`DataFrame.plot` (:issue:`25481`)
142
-
- Bug in error messages in :meth:`DataFrame.corr` and :meth:`Series.corr`. Added the possibility of using a callable. (:issue:`25729`)
143
-
- Bug in :meth:`Series.divmod` and :meth:`Series.rdivmod` which would raise an (incorrect) ``ValueError`` rather than return a pair of :class:`Series` object as result (:issue:`25557`)
178
+
144
179
145
180
Categorical
146
181
^^^^^^^^^^^
@@ -152,6 +187,7 @@ Categorical
152
187
Datetimelike
153
188
^^^^^^^^^^^^
154
189
190
+
- Bug in :func:`to_datetime` which would raise an (incorrect) ``ValueError`` when called with a date far into the future and the ``format`` argument specified instead of raising ``OutOfBoundsDatetime`` (:issue:`23830`)
155
191
-
156
192
-
157
193
-
@@ -175,6 +211,8 @@ Numeric
175
211
176
212
- Bug in :meth:`to_numeric` in which large negative numbers were being improperly handled (:issue:`24910`)
177
213
- Bug in :meth:`to_numeric` in which numbers were being coerced to float, even though ``errors`` was not ``coerce`` (:issue:`24910`)
214
+
- Bug in error messages in :meth:`DataFrame.corr` and :meth:`Series.corr`. Added the possibility of using a callable. (:issue:`25729`)
215
+
- Bug in :meth:`Series.divmod` and :meth:`Series.rdivmod` which would raise an (incorrect) ``ValueError`` rather than return a pair of :class:`Series` objects as result (:issue:`25557`)
178
216
-
179
217
-
180
218
-
@@ -242,6 +280,7 @@ Plotting
242
280
^^^^^^^^
243
281
244
282
- Fixed bug where :class:`api.extensions.ExtensionArray` could not be used in matplotlib plotting (:issue:`25587`)
283
+
- Bug in an error message in :meth:`DataFrame.plot`. Improved the error message if non-numerics are passed to :meth:`DataFrame.plot` (:issue:`25481`)
245
284
-
246
285
-
247
286
-
@@ -253,6 +292,7 @@ Groupby/Resample/Rolling
253
292
- Bug in :meth:`pandas.core.groupby.DataFrameGroupBy.nunique` in which the names of column levels were lost (:issue:`23222`)
254
293
- Bug in :func:`pandas.core.groupby.GroupBy.agg` when applying a aggregation function to timezone aware data (:issue:`23683`)
255
294
- Bug in :func:`pandas.core.groupby.GroupBy.first` and :func:`pandas.core.groupby.GroupBy.last` where timezone information would be dropped (:issue:`21603`)
295
+
- Ensured that ordering of outputs in ``groupby`` aggregation functions is consistent across all versions of Python (:issue:`25692`)
0 commit comments