@@ -6266,14 +6266,55 @@ def prod(
62666266 )
62676267
62686268 @deprecate_nonkeyword_arguments (version = "3.0" , allowed_args = ["self" ], name = "mean" )
6269- @doc (make_doc ("mean" , ndim = 1 ))
62706269 def mean (
62716270 self ,
62726271 axis : Axis | None = 0 ,
62736272 skipna : bool = True ,
62746273 numeric_only : bool = False ,
62756274 ** kwargs ,
62766275 ) -> 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+ **kwargs
6295+ Additional keyword arguments to be passed to the function.
6296+
6297+ Returns
6298+ -------
6299+ scalar or Series (if level specified)
6300+ Median of the values for the requested axis.
6301+
6302+ See Also
6303+ --------
6304+ numpy.median : Equivalent numpy function for computing median.
6305+ Series.sum : Sum of the values.
6306+ Series.median : Median of the values.
6307+ Series.std : Standard deviation of the values.
6308+ Series.var : Variance of the values.
6309+ Series.min : Minimum value.
6310+ Series.max : Maximum value.
6311+
6312+ Examples
6313+ --------
6314+ >>> s = pd.Series([1, 2, 3])
6315+ >>> s.mean()
6316+ 2.0
6317+ """
62776318 return NDFrame .mean (
62786319 self , axis = axis , skipna = skipna , numeric_only = numeric_only , ** kwargs
62796320 )
0 commit comments