Skip to content

Commit d5ba260

Browse files
committed
doc issues
1 parent 41d1274 commit d5ba260

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

doc/source/user_guide/groupby.rst

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,20 +1221,6 @@ The dimension of the returned result can also change:
12211221
12221222
grouped.apply(f)
12231223
1224-
``apply`` on a Series can operate on a returned value from the applied function
1225-
that is itself a series, and possibly upcast the result to a DataFrame:
1226-
1227-
.. ipython:: python
1228-
:okwarning:
1229-
1230-
def f(x):
1231-
return pd.Series([x, x ** 2], index=["x", "x^2"])
1232-
1233-
1234-
s = pd.Series(np.random.rand(5))
1235-
s
1236-
s.apply(f)
1237-
12381224
Similar to :ref:`groupby.aggregate.agg`, the resulting dtype will reflect that of the
12391225
apply function. If the results from different groups have different dtypes, then
12401226
a common dtype will be determined in the same way as ``DataFrame`` construction.

doc/source/whatsnew/v2.1.0.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ Deprecations
172172
- Deprecated the methods :meth:`Series.bool` and :meth:`DataFrame.bool` (:issue:`51749`)
173173
- Deprecated :meth:`DataFrame.swapaxes` and :meth:`Series.swapaxes`, use :meth:`DataFrame.transpose` or :meth:`Series.transpose` instead (:issue:`51946`)
174174
- Deprecated parameter ``convert_type`` in :meth:`Series.apply` (:issue:`52140`)
175-
- Deprecated making :meth:`Series.apply` return a :class:`DataFrame` when the passed-in callable returns a :class:`Series` object. In the future this will return a :class:`Series` whose values are themselves :class:`Series`.
176-
This pattern was very slow and it's recommended to use alternative methods to archive the same goal (:issue:`52116`)
175+
- Deprecated making :meth:`Series.apply` return a :class:`DataFrame` when the passed-in callable returns a :class:`Series` object. In the future this will return a :class:`Series` whose values are themselves :class:`Series`. This pattern was very slow and it's recommended to use alternative methods to archive the same goal (:issue:`52116`)
177176
-
178177

179178

0 commit comments

Comments
 (0)