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.23.0.txt
+71-2
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ Previous Behavior:
142
142
4 NaN
143
143
dtype: float64
144
144
145
-
Current Behavior
145
+
Current Behavior:
146
146
147
147
.. ipython:: python
148
148
@@ -167,7 +167,7 @@ Previous Behavior:
167
167
3 2.5
168
168
dtype: float64
169
169
170
-
Current Behavior
170
+
Current Behavior:
171
171
172
172
.. ipython:: python
173
173
@@ -332,6 +332,73 @@ Convert to an xarray DataArray
332
332
333
333
p.to_xarray()
334
334
335
+
.. _whatsnew_0230.api_breaking.apply:
336
+
337
+
Apply Changes
338
+
~~~~~~~~~~~~~
339
+
340
+
:func:`DataFrame.apply` was inconsistent when applying an arbitrary user-defined-function that returned a list-like with ``axis=1``. Several bugs and inconsistencies
341
+
are resolved. If the applied function returns a Series, then pandas will return a DataFrame; otherwise a Series will be returned, this includes the case
342
+
where a list-like (e.g. ``tuple`` or ``list`` is returned), (:issue:`16353`, :issue:`17437`, :issue:`17970`, :issue:`17348`, :issue:`17892`, :issue:`18573`,
- The ``is_copy`` attribute is deprecated and will be removed in a future version (:issue:`18801`).
457
524
- ``IntervalIndex.from_intervals`` is deprecated in favor of the :class:`IntervalIndex` constructor (:issue:`19263`)
458
525
- :func:``DataFrame.from_items`` is deprecated. Use :func:``DataFrame.from_dict()`` instead, or :func:``DataFrame.from_dict(OrderedDict())`` if you wish to preserve the key order (:issue:`17320`)
526
+
- The ``broadcast`` parameter of ``.apply()`` is removed in favor of ``result_type='broadcast'`` (:issue:`18577`)
527
+
- The ``reduce`` parameter of ``.apply()`` is removed in favor of ``result_type='reduce'`` (:issue:`18577`)
0 commit comments