當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。