@@ -6206,14 +6206,72 @@ def all(
62066206 )
62076207
62086208 @deprecate_nonkeyword_arguments (version = "3.0" , allowed_args = ["self" ], name = "min" )
6209- @doc (make_doc ("min" , ndim = 1 ))
62106209 def min (
62116210 self ,
62126211 axis : Axis | None = 0 ,
62136212 skipna : bool = True ,
62146213 numeric_only : bool = False ,
62156214 ** kwargs ,
62166215 ):
6216+ """
6217+ Return the minimum of the values over the requested axis.
6218+
6219+ If you want the *index* of the minimum, use ``idxmin``.
6220+ This is the equivalent of the ``numpy.ndarray`` method ``argmin``.
6221+
6222+ Parameters
6223+ ----------
6224+ axis : {index (0)}
6225+ Axis for the function to be applied on.
6226+ For `Series` this parameter is unused and defaults to 0.
6227+
6228+ For DataFrames, specifying ``axis=None`` will apply the aggregation
6229+ across both axes.
6230+
6231+ .. versionadded:: 2.0.0
6232+
6233+ skipna : bool, default True
6234+ Exclude NA/null values when computing the result.
6235+ numeric_only : bool, default False
6236+ Include only float, int, boolean columns.
6237+ **kwargs
6238+ Additional keyword arguments to be passed to the function.
6239+
6240+ Returns
6241+ -------
6242+ scalar or Series (if level specified)
6243+ The maximum of the values in the Series.
6244+
6245+ See Also
6246+ --------
6247+ numpy.min : Equivalent numpy function for arrays.
6248+ Series.min : Return the minimum.
6249+ Series.max : Return the maximum.
6250+ Series.idxmin : Return the index of the minimum.
6251+ Series.idxmax : Return the index of the maximum.
6252+ DataFrame.min : Return the minimum over the requested axis.
6253+ DataFrame.max : Return the maximum over the requested axis.
6254+ DataFrame.idxmin : Return the index of the minimum over the requested axis.
6255+ DataFrame.idxmax : Return the index of the maximum over the requested axis.
6256+
6257+ Examples
6258+ --------
6259+ >>> idx = pd.MultiIndex.from_arrays(
6260+ ... [["warm", "warm", "cold", "cold"], ["dog", "falcon", "fish", "spider"]],
6261+ ... names=["blooded", "animal"],
6262+ ... )
6263+ >>> s = pd.Series([4, 2, 0, 8], name="legs", index=idx)
6264+ >>> s
6265+ blooded animal
6266+ warm dog 4
6267+ falcon 2
6268+ cold fish 0
6269+ spider 8
6270+ Name: legs, dtype: int64
6271+
6272+ >>> s.min()
6273+ 0
6274+ """
62176275 return NDFrame .min (
62186276 self , axis = axis , skipna = skipna , numeric_only = numeric_only , ** kwargs
62196277 )
0 commit comments