当前位置: 首页>>代码示例>>Python>>正文


Python nanops.nanmax方法代码示例

本文整理汇总了Python中pandas.core.nanops.nanmax方法的典型用法代码示例。如果您正苦于以下问题:Python nanops.nanmax方法的具体用法?Python nanops.nanmax怎么用?Python nanops.nanmax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pandas.core.nanops的用法示例。


在下文中一共展示了nanops.nanmax方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_nanmax

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def test_nanmax(self):
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", RuntimeWarning)
            func = partial(self._minmax_wrap, func=np.max)
            self.check_funs(nanops.nanmax, func,
                            allow_str=False, allow_obj=False) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:8,代码来源:test_nanops.py

示例2: max

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def max(self, axis=None, skipna=True, *args, **kwargs):
        """
        Return the maximum value of the Array or maximum along
        an axis.

        See Also
        --------
        numpy.ndarray.max
        Index.max : Return the maximum value in an Index.
        Series.max : Return the maximum value in a Series.
        """
        # TODO: skipna is broken with max.
        # See https://github.com/pandas-dev/pandas/issues/24265
        nv.validate_max(args, kwargs)
        nv.validate_minmax_axis(axis)

        mask = self.isna()
        if skipna:
            values = self[~mask].asi8
        elif mask.any():
            return NaT
        else:
            values = self.asi8

        if not len(values):
            # short-circut for empty max / min
            return NaT

        result = nanops.nanmax(values, skipna=skipna)
        # Don't have to worry about NA `result`, since no NA went in.
        return self._box_func(result)


# -------------------------------------------------------------------
# Shared Constructor Helpers 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:37,代码来源:datetimelike.py

示例3: max

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def max(self, axis=None, out=None, keepdims=False, skipna=True):
        nv.validate_max((), dict(out=out, keepdims=keepdims))
        return nanops.nanmax(self._ndarray, axis=axis, skipna=skipna) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:5,代码来源:numpy_.py

示例4: max

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def max(self, axis=None, skipna=True):
        """
        Return the maximum value of the Index.

        Parameters
        ----------
        axis : int, optional
            For compatibility with NumPy. Only 0 or None are allowed.
        skipna : bool, default True

        Returns
        -------
        scalar
            Maximum value.

        See Also
        --------
        Index.min : Return the minimum value in an Index.
        Series.max : Return the maximum value in a Series.
        DataFrame.max : Return the maximum values in a DataFrame.

        Examples
        --------
        >>> idx = pd.Index([3, 2, 1])
        >>> idx.max()
        3

        >>> idx = pd.Index(['c', 'b', 'a'])
        >>> idx.max()
        'c'

        For a MultiIndex, the maximum is determined lexicographically.

        >>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
        >>> idx.max()
        ('b', 2)
        """
        nv.validate_minmax_axis(axis)
        return nanops.nanmax(self._values, skipna=skipna) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:41,代码来源:base.py

示例5: test_nanmax

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def test_nanmax(self):
        with warnings.catch_warnings(record=True):
            func = partial(self._minmax_wrap, func=np.max)
            self.check_funs(nanops.nanmax, func,
                            allow_str=False, allow_obj=False) 
开发者ID:birforce,项目名称:vnpy_crypto,代码行数:7,代码来源:test_nanops.py

示例6: max

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def max(self):
        """
        Return the maximum value of the Index.

        Returns
        -------
        scalar
            Maximum value.

        See Also
        --------
        Index.min : Return the minimum value in an Index.
        Series.max : Return the maximum value in a Series.
        DataFrame.max : Return the maximum values in a DataFrame.

        Examples
        --------
        >>> idx = pd.Index([3, 2, 1])
        >>> idx.max()
        3

        >>> idx = pd.Index(['c', 'b', 'a'])
        >>> idx.max()
        'c'

        For a MultiIndex, the maximum is determined lexicographically.

        >>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
        >>> idx.max()
        ('b', 2)
        """
        return nanops.nanmax(self.values) 
开发者ID:birforce,项目名称:vnpy_crypto,代码行数:34,代码来源:base.py

示例7: max

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def max(self):
        """ The maximum value of the object """
        return nanops.nanmax(self.values) 
开发者ID:nccgroup,项目名称:Splunking-Crime,代码行数:5,代码来源:base.py

示例8: test_nanmax

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nanmax [as 别名]
def test_nanmax(self):
        func = partial(self._minmax_wrap, func=np.max)
        self.check_funs(nanops.nanmax, func, allow_str=False, allow_obj=False) 
开发者ID:securityclippy,项目名称:elasticintel,代码行数:5,代码来源:test_nanops.py


注:本文中的pandas.core.nanops.nanmax方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。