def bool(self):
v = self.squeeze()<EOL>if isinstance(v, (bool, np.bool_)):<EOL><INDENT>return bool(v)<EOL><DEDENT>elif is_scalar(v):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>".format(self.__class__.__name__))<EOL><DEDENT>self.__nonzero__()<EOL>
Return the bool of a single element PandasObject.

This must be a boolean scalar value, either True or False.  Raise a
ValueError if the PandasObject does not have exactly 1 element, or that
element is not boolean