@@ -10378,7 +10378,7 @@ def apply(
1037810378 ----------
1037910379 func : function
1038010380 Function to apply to each column or row.
10381-
10381+
1038210382 axis : {0 or 'index', 1 or 'columns'}, default 0
1038310383 Axis along which the function is applied:
1038410384
@@ -10397,25 +10397,25 @@ def apply(
1039710397
1039810398 result_type : {'expand', 'reduce', 'broadcast', None}, default None
1039910399 These only act when ``axis=1`` (columns):
10400-
10400+
1040110401 * 'expand' : list-like results will be turned into columns.
1040210402 Note: The output type is inferred from the first function return value.
1040310403 If the first return value is not list-like (e.g., None or NaN), expansion
1040410404 will not occur, and the result may be a Series instead of a DataFrame.
1040510405 To avoid inconsistent output types, ensure your function returns consistent
1040610406 list-like objects (e.g., an empty dict {}) for missing or NaN-like values.
10407-
10407+
1040810408 * 'reduce' : returns a Series if possible rather than expanding
1040910409 list-like results. This is the opposite of 'expand'.
1041010410 * 'broadcast' : results will be broadcast to the original shape
1041110411 of the DataFrame, the original index and columns will be
1041210412 retained.
10413-
10413+
1041410414 The default behaviour (None) depends on the return value of the
1041510415 applied function: list-like results will be returned as a Series
1041610416 of those. However if the apply function returns a Series these
10417- are expanded to columns.
10418-
10417+ are expanded to columns.
10418+
1041910419 args : tuple
1042010420 Positional arguments to pass to `func` in addition to the
1042110421 array/series.
0 commit comments