本文整理匯總了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)