@@ -10378,7 +10378,7 @@ def apply(
10378
10378
----------
10379
10379
func : function
10380
10380
Function to apply to each column or row.
10381
-
10381
+
10382
10382
axis : {0 or 'index', 1 or 'columns'}, default 0
10383
10383
Axis along which the function is applied:
10384
10384
@@ -10397,25 +10397,25 @@ def apply(
10397
10397
10398
10398
result_type : {'expand', 'reduce', 'broadcast', None}, default None
10399
10399
These only act when ``axis=1`` (columns):
10400
-
10400
+
10401
10401
* 'expand' : list-like results will be turned into columns.
10402
10402
Note: The output type is inferred from the first function return value.
10403
10403
If the first return value is not list-like (e.g., None or NaN), expansion
10404
10404
will not occur, and the result may be a Series instead of a DataFrame.
10405
10405
To avoid inconsistent output types, ensure your function returns consistent
10406
10406
list-like objects (e.g., an empty dict {}) for missing or NaN-like values.
10407
-
10407
+
10408
10408
* 'reduce' : returns a Series if possible rather than expanding
10409
10409
list-like results. This is the opposite of 'expand'.
10410
10410
* 'broadcast' : results will be broadcast to the original shape
10411
10411
of the DataFrame, the original index and columns will be
10412
10412
retained.
10413
-
10413
+
10414
10414
The default behaviour (None) depends on the return value of the
10415
10415
applied function: list-like results will be returned as a Series
10416
10416
of those. However if the apply function returns a Series these
10417
- are expanded to columns.
10418
-
10417
+ are expanded to columns.
10418
+
10419
10419
args : tuple
10420
10420
Positional arguments to pass to `func` in addition to the
10421
10421
array/series.
0 commit comments