@@ -6266,14 +6266,56 @@ def prod(
6266
6266
)
6267
6267
6268
6268
@deprecate_nonkeyword_arguments (version = "3.0" , allowed_args = ["self" ], name = "mean" )
6269
- @doc (make_doc ("mean" , ndim = 1 ))
6270
6269
def mean (
6271
6270
self ,
6272
6271
axis : Axis | None = 0 ,
6273
6272
skipna : bool = True ,
6274
6273
numeric_only : bool = False ,
6275
6274
** kwargs ,
6276
6275
) -> Any :
6276
+ """
6277
+ Return the mean of the values over the requested axis.
6278
+
6279
+ Parameters
6280
+ ----------
6281
+ axis : {index (0)}
6282
+ Axis for the function to be applied on.
6283
+ For `Series` this parameter is unused and defaults to 0.
6284
+
6285
+ For DataFrames, specifying ``axis=None`` will apply the aggregation
6286
+ across both axes.
6287
+
6288
+ .. versionadded:: 2.0.0
6289
+
6290
+ skipna : bool, default True
6291
+ Exclude NA/null values when computing the result.
6292
+ numeric_only : bool, default False
6293
+ Include only float, int, boolean columns.
6294
+
6295
+ **kwargs
6296
+ Additional keyword arguments to be passed to the function.
6297
+
6298
+ Returns
6299
+ -------
6300
+ scalar or Series (if level specified)
6301
+ Median of the values for the requested axis.
6302
+
6303
+ See Also
6304
+ --------
6305
+ numpy.median : Equivalent numpy function for computing median.
6306
+ Series.sum : Sum of the values.
6307
+ Series.median : Median of the values.
6308
+ Series.std : Standard deviation of the values.
6309
+ Series.var : Variance of the values.
6310
+ Series.min : Minimum value.
6311
+ Series.max : Maximum value.
6312
+
6313
+ Examples
6314
+ --------
6315
+ >>> s = pd.Series([1, 2, 3])
6316
+ >>> s.mean()
6317
+ 2.0
6318
+ """
6277
6319
return NDFrame .mean (
6278
6320
self , axis = axis , skipna = skipna , numeric_only = numeric_only , ** kwargs
6279
6321
)
0 commit comments