I have a pandas DataFrame as below:
>>> df
t v
2014-02-21 10:30:43 False
2014-02-21 10:31:34 False
2014-02-21 10:32:25 False
>>> df.dtypes
t str
v bool
I need to check if the dtype
of this dataframe is bool
. I tried with:
>>> print('Type is Boolean = ', isinstance(df1, bool) )
Type is Boolean = False
How can I do this?
Source: check if variable is dataframe