本文整理汇总了Python中pandas.core.nanops.nanmin方法的典型用法代码示例。如果您正苦于以下问题:Python nanops.nanmin方法的具体用法?Python nanops.nanmin怎么用?Python nanops.nanmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandas.core.nanops
的用法示例。
在下文中一共展示了nanops.nanmin方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: min
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def min(self, axis=None, skipna=True, *args, **kwargs):
"""
Return the minimum value of the Array or minimum along
an axis.
See Also
--------
numpy.ndarray.min
Index.min : Return the minimum value in an Index.
Series.min : Return the minimum value in a Series.
"""
nv.validate_min(args, kwargs)
nv.validate_minmax_axis(axis)
result = nanops.nanmin(self.asi8, skipna=skipna, mask=self.isna())
if isna(result):
# Period._from_ordinal does not handle np.nan gracefully
return NaT
return self._box_func(result)
示例2: test_nanmin
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def test_nanmin(self):
with warnings.catch_warnings(record=True):
warnings.simplefilter("ignore", RuntimeWarning)
func = partial(self._minmax_wrap, func=np.min)
self.check_funs(nanops.nanmin, func,
allow_str=False, allow_obj=False)
示例3: min
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def min(self, axis=None, out=None, keepdims=False, skipna=True):
nv.validate_min((), dict(out=out, keepdims=keepdims))
return nanops.nanmin(self._ndarray, axis=axis, skipna=skipna)
示例4: min
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def min(self, axis=None, skipna=True):
"""
Return the minimum value of the Index.
Parameters
----------
axis : {None}
Dummy argument for consistency with Series
skipna : bool, default True
Returns
-------
scalar
Minimum value.
See Also
--------
Index.max : Return the maximum value of the object.
Series.min : Return the minimum value in a Series.
DataFrame.min : Return the minimum values in a DataFrame.
Examples
--------
>>> idx = pd.Index([3, 2, 1])
>>> idx.min()
1
>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.min()
'a'
For a MultiIndex, the minimum is determined lexicographically.
>>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
>>> idx.min()
('a', 1)
"""
nv.validate_minmax_axis(axis)
return nanops.nanmin(self._values, skipna=skipna)
示例5: test_nanmin
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def test_nanmin(self):
with warnings.catch_warnings(record=True):
func = partial(self._minmax_wrap, func=np.min)
self.check_funs(nanops.nanmin, func,
allow_str=False, allow_obj=False)
示例6: min
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def min(self):
"""
Return the minimum value of the Index.
Returns
-------
scalar
Minimum value.
See Also
--------
Index.max : Return the maximum value of the object.
Series.min : Return the minimum value in a Series.
DataFrame.min : Return the minimum values in a DataFrame.
Examples
--------
>>> idx = pd.Index([3, 2, 1])
>>> idx.min()
1
>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.min()
'a'
For a MultiIndex, the minimum is determined lexicographically.
>>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
>>> idx.min()
('a', 1)
"""
return nanops.nanmin(self.values)
示例7: min
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def min(self):
""" The minimum value of the object """
return nanops.nanmin(self.values)
示例8: test_nanmin
# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmin [as 别名]
def test_nanmin(self):
func = partial(self._minmax_wrap, func=np.min)
self.check_funs(nanops.nanmin, func, allow_str=False, allow_obj=False)