pandas.Index.min#

Index.min(axis=None, skipna=True, *args, **kwargs)[源代码]#

返回索引的最小值。

Parameters:
axis{ None }

与 Series 保持一致的虚拟参数。

<strong>skipna</strong>bool, default True

在显示结果时排除 NA/null 值。

*args, **kwargs

用于与 NumPy 兼容的附加参数和关键字。

Returns:
scalar

最小值。

参见

Index.max

返回对象中的最大值。

Series.min

返回Series中的最小值。

DataFrame.min

返回DataFrame中的最小值。

Examples

>>> idx = pd.Index([3, 2, 1])
>>> idx.min()
1
>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.min()
'a'

对于MultiIndex,最小值是按字典顺序确定的。

>>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
>>> idx.min()
('a', 1)