upby.html)
  * [ Resampling ](../resampling.html)
  * [ Style ](../style.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ DataFrame ](../frame.html)
  * pandas.DataFrame.all 

#  pandas.DataFrame.all  #

DataFrame.  all  (  _ axis  =  0  _ , _ bool_only  =  False  _ , _ skipna  =
True  _ , _ **  kwargs  _ )  [ [source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/core/frame.py#L11620-L11633) #

    

Return whether all elements are True, potentially over an axis.

Returns True unless there at least one element within a series or along a
Dataframe axis that is False or equivalent (e.g. zero or empty).

Parameters  :

    

**axis** {0 or âindexâ, 1 or âcolumnsâ, None}, default 0

    

Indicate which axis or axes should be reduced. For  Series  this parameter is
unused and defaults to 0.

  * 0 / âindexâ : reduce the index, return a Series whose index is the original column labels. 

  * 1 / âcolumnsâ : reduce the columns, return a Series whose index is the original index. 

  * None : reduce all axes, return a scalar. 

**bool_only** bool, default False

    

Include only boolean columns. Not implemented for Series.

**skipna** bool, default True

    

Exclude NA/null values. If the entire row/column is NA and skipna is True,
then the result will be True, as for an empty row/column. If skipna is False,
then NA are treated as True, because these are not equal to zero.

****kwargs** any, default None

    

Additional keywords have no effect but might be accepted for compatibility
with NumPy.

Returns  :

    

Series or DataFrame

    

If level is specified, then, DataFrame is returned; otherwise, Series is
returned.

See also

[ ` Series.all  ` ](pandas.Series.all.html#pandas.Series.all
"pandas.Series.all")

    

Return True if all elements are True.

[ ` DataFrame.any  ` ](pandas.DataFrame.any.html#pandas.DataFrame.any
"pandas.DataFrame.any")

    

Return True if one (or more) elements are True.

Examples

**Series**

    
    
    >>> pd.Series([True, True]).all()
    True
    >>> pd.Series([True, False]).all()
    False
    >>> pd.Series([], dtype="float64").all()
    True
    >>> pd.Series([np.nan]).all()
    True
    >>> pd.Series([np.nan]).all(skipna=False)
    True
    

**DataFrames**

Create a dataframe from a dictionary.

    
    
    >>> df = pd.DataFrame({'col1': [True, True], 'col2': [True, False]})
    >>> df
       col1   col2
    0  True   True
    1  True  False
    

Default behaviour checks if values in each column all return True.

    
    
    >>> df.all()
    col1     True
    col2    False
    dtype: bool
    

Specify ` axis='columns'  ` to check if values in each row all return True.

    
    
    >>> df.all(axis='columns')
    0     True
    1    False
    dtype: bool
    

Or ` axis=None  ` for whether every value is True.

    
    
    >>> df.all(axis=None)
    False
    

[ __ previous  pandas.DataFrame.abs  ](pandas.DataFrame.abs.html "previous
page") [ next  pandas.DataFrame.any  __ ](pandas.DataFrame.any.html "next
page")

__ On this page

  * ` DataFrame.all()  `

[ __ Show Source ](../../_sources/reference/api/pandas.DataFrame.all.rst.txt)

© 2024, pandas via [ NumFOCUS, Inc. ](https://numfocus.org) Hosted by [
OVHcloud ](https://www.ovhcloud.com) .

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.6.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index.html) 0.14.4.