Python pandas.core.nanops.nanall() Examples

The following are 14 code examples of pandas.core.nanops.nanall(). 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 Project: recruit   Author: Frank-qlu   File: test_panel.py    License: Apache License 2.0 5 votes vote down vote up
def test_all_any(self):
        assert (self.panel.all(axis=0).values == nanall(
            self.panel, axis=0)).all()
        assert (self.panel.all(axis=1).values == nanall(
            self.panel, axis=1).T).all()
        assert (self.panel.all(axis=2).values == nanall(
            self.panel, axis=2).T).all()
        assert (self.panel.any(axis=0).values == nanany(
            self.panel, axis=0)).all()
        assert (self.panel.any(axis=1).values == nanany(
            self.panel, axis=1).T).all()
        assert (self.panel.any(axis=2).values == nanany(
            self.panel, axis=2).T).all() 
Example #2
Source Project: recruit   Author: Frank-qlu   File: test_nanops.py    License: Apache License 2.0 5 votes vote down vote up
def test_nanall(self):
        self.check_funs(nanops.nanall, np.all, allow_all_nan=False,
                        allow_str=False, allow_date=False, allow_tdelta=False) 
Example #3
Source Project: recruit   Author: Frank-qlu   File: numpy_.py    License: Apache License 2.0 5 votes vote down vote up
def all(self, axis=None, out=None, keepdims=False, skipna=True):
        nv.validate_all((), dict(out=out, keepdims=keepdims))
        return nanops.nanall(self._ndarray, axis=axis, skipna=skipna) 
Example #4
Source Project: vnpy_crypto   Author: birforce   File: test_panel.py    License: MIT License 5 votes vote down vote up
def test_all_any(self):
        assert (self.panel.all(axis=0).values == nanall(
            self.panel, axis=0)).all()
        assert (self.panel.all(axis=1).values == nanall(
            self.panel, axis=1).T).all()
        assert (self.panel.all(axis=2).values == nanall(
            self.panel, axis=2).T).all()
        assert (self.panel.any(axis=0).values == nanany(
            self.panel, axis=0)).all()
        assert (self.panel.any(axis=1).values == nanany(
            self.panel, axis=1).T).all()
        assert (self.panel.any(axis=2).values == nanany(
            self.panel, axis=2).T).all() 
Example #5
Source Project: vnpy_crypto   Author: birforce   File: test_nanops.py    License: MIT License 5 votes vote down vote up
def test_nanall(self):
        self.check_funs(nanops.nanall, np.all, allow_all_nan=False,
                        allow_str=False, allow_date=False, allow_tdelta=False) 
Example #6
Source Project: Computable   Author: ktraunmueller   File: frame.py    License: MIT License 5 votes vote down vote up
def all(self, axis=None, bool_only=None, skipna=True, level=None,
            **kwargs):
        """
        Return whether all elements are True over requested axis.
        %(na_action)s

        Parameters
        ----------
        axis : {0, 1}
            0 for row-wise, 1 for column-wise
        skipna : boolean, default True
            Exclude NA/null values. If an entire row/column is NA, the result
            will be NA
        level : int, default None
            If the axis is a MultiIndex (hierarchical), count along a
            particular level, collapsing into a DataFrame
        bool_only : boolean, default None
            Only include boolean data.

        Returns
        -------
        any : Series (or DataFrame if level specified)
        """
        if axis is None:
            axis = self._stat_axis_number
        if level is not None:
            return self._agg_by_level('all', axis=axis, level=level,
                                      skipna=skipna)
        return self._reduce(nanops.nanall, axis=axis, skipna=skipna,
                            numeric_only=bool_only, filter_type='bool') 
Example #7
Source Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: test_panel.py    License: Apache License 2.0 5 votes vote down vote up
def test_all_any(self):
        assert (self.panel.all(axis=0).values == nanall(
            self.panel, axis=0)).all()
        assert (self.panel.all(axis=1).values == nanall(
            self.panel, axis=1).T).all()
        assert (self.panel.all(axis=2).values == nanall(
            self.panel, axis=2).T).all()
        assert (self.panel.any(axis=0).values == nanany(
            self.panel, axis=0)).all()
        assert (self.panel.any(axis=1).values == nanany(
            self.panel, axis=1).T).all()
        assert (self.panel.any(axis=2).values == nanany(
            self.panel, axis=2).T).all() 
Example #8
Source Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: test_nanops.py    License: Apache License 2.0 5 votes vote down vote up
def test_nanall(self):
        self.check_funs(nanops.nanall, np.all, allow_all_nan=False,
                        allow_str=False, allow_date=False, allow_tdelta=False) 
Example #9
Source Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: numpy_.py    License: Apache License 2.0 5 votes vote down vote up
def all(self, axis=None, out=None, keepdims=False, skipna=True):
        nv.validate_all((), dict(out=out, keepdims=keepdims))
        return nanops.nanall(self._ndarray, axis=axis, skipna=skipna) 
Example #10
Source Project: elasticintel   Author: securityclippy   File: test_panel.py    License: GNU General Public License v3.0 5 votes vote down vote up
def test_all_any(self):
        assert (self.panel.all(axis=0).values == nanall(
            self.panel, axis=0)).all()
        assert (self.panel.all(axis=1).values == nanall(
            self.panel, axis=1).T).all()
        assert (self.panel.all(axis=2).values == nanall(
            self.panel, axis=2).T).all()
        assert (self.panel.any(axis=0).values == nanany(
            self.panel, axis=0)).all()
        assert (self.panel.any(axis=1).values == nanany(
            self.panel, axis=1).T).all()
        assert (self.panel.any(axis=2).values == nanany(
            self.panel, axis=2).T).all() 
Example #11
Source Project: elasticintel   Author: securityclippy   File: test_nanops.py    License: GNU General Public License v3.0 5 votes vote down vote up
def test_nanall(self):
        self.check_funs(nanops.nanall, np.all, allow_all_nan=False,
                        allow_str=False, allow_date=False, allow_tdelta=False) 
Example #12
Source Project: coffeegrindsize   Author: jgagneastro   File: test_panel.py    License: MIT License 5 votes vote down vote up
def test_all_any(self):
        assert (self.panel.all(axis=0).values == nanall(
            self.panel, axis=0)).all()
        assert (self.panel.all(axis=1).values == nanall(
            self.panel, axis=1).T).all()
        assert (self.panel.all(axis=2).values == nanall(
            self.panel, axis=2).T).all()
        assert (self.panel.any(axis=0).values == nanany(
            self.panel, axis=0)).all()
        assert (self.panel.any(axis=1).values == nanany(
            self.panel, axis=1).T).all()
        assert (self.panel.any(axis=2).values == nanany(
            self.panel, axis=2).T).all() 
Example #13
Source Project: twitter-stock-recommendation   Author: alvarobartt   File: test_panel.py    License: MIT License 5 votes vote down vote up
def test_all_any(self):
        assert (self.panel.all(axis=0).values == nanall(
            self.panel, axis=0)).all()
        assert (self.panel.all(axis=1).values == nanall(
            self.panel, axis=1).T).all()
        assert (self.panel.all(axis=2).values == nanall(
            self.panel, axis=2).T).all()
        assert (self.panel.any(axis=0).values == nanany(
            self.panel, axis=0)).all()
        assert (self.panel.any(axis=1).values == nanany(
            self.panel, axis=1).T).all()
        assert (self.panel.any(axis=2).values == nanany(
            self.panel, axis=2).T).all() 
Example #14
Source Project: twitter-stock-recommendation   Author: alvarobartt   File: test_nanops.py    License: MIT License 5 votes vote down vote up
def test_nanall(self):
        self.check_funs(nanops.nanall, np.all, allow_all_nan=False,
                        allow_str=False, allow_date=False, allow_tdelta=False)