chevron_left
Miscellaneous
0
0
0
new
Pandas DataFrame | bool method
Programming
chevron_rightPython
chevron_rightPandas
chevron_rightDocumentation
chevron_rightDataFrame
chevron_rightMiscellaneous
schedule Jul 1, 2022
Last updated Python●Pandas
Tags tocTable of Contents
expand_more Pandas DataFrame.bool()
method returns True
if a DataFrame of size one holds a True
boolean, and False
if it holds a False
boolean.
WARNING
An error is thrown if the DataFrame does not contain exactly one boolean.
Parameters
This method does not take in any parameter.
Return Value
A single boolean.
Examples
Consider the following DataFrame that contains a single True
boolean:
df
A0 True
Calling the bool()
method yields:
df.bool()
True
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...
Official Pandas Documentation
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.bool.html
0
0
0
Enjoy our search