Python pandas.core.nanops.nanmin() Examples

The following are 14 code examples of pandas.core.nanops.nanmin(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pandas.core.nanops , or try the search function .
Example #1
Source File: datetimelike.py    From recruit with Apache License 2.0 6 votes vote down vote up
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) 
Example #2
Source File: datetimelike.py    From predictive-maintenance-using-machine-learning with Apache License 2.0 6 votes vote down vote up
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) 
Example #3
Source File: test_nanops.py    From recruit with Apache License 2.0 5 votes vote down vote up
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) 
Example #4
Source File: numpy_.py    From recruit with Apache License 2.0 5 votes vote down vote up
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) 
Example #5
Source File: base.py    From recruit with Apache License 2.0 5 votes vote down vote up
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) 
Example #6
Source File: test_nanops.py    From vnpy_crypto with MIT License 5 votes vote down vote up
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) 
Example #7
Source File: base.py    From vnpy_crypto with MIT License 5 votes vote down vote up
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) 
Example #8
Source File: test_nanops.py    From predictive-maintenance-using-machine-learning with Apache License 2.0 5 votes vote down vote up
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) 
Example #9
Source File: numpy_.py    From predictive-maintenance-using-machine-learning with Apache License 2.0 5 votes vote down vote up
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) 
Example #10
Source File: base.py    From predictive-maintenance-using-machine-learning with Apache License 2.0 5 votes vote down vote up
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) 
Example #11
Source File: base.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def min(self):
        """ The minimum value of the object """
        return nanops.nanmin(self.values) 
Example #12
Source File: test_nanops.py    From elasticintel with GNU General Public License v3.0 5 votes vote down vote up
def test_nanmin(self):
        func = partial(self._minmax_wrap, func=np.min)
        self.check_funs(nanops.nanmin, func, allow_str=False, allow_obj=False) 
Example #13
Source File: base.py    From elasticintel with GNU General Public License v3.0 5 votes vote down vote up
def min(self):
        """ The minimum value of the object """
        return nanops.nanmin(self.values) 
Example #14
Source File: test_nanops.py    From twitter-stock-recommendation with MIT License 5 votes vote down vote up
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)