bool(self)
This must be a boolean scalar value, either True or False. It will raise a ValueError if the Series or DataFrame does not have exactly 1 element, or that element is not boolean (integer values 0 and 1 will also raise an exception).
The value in the Series or DataFrame.
Return the bool of a single element Series or DataFrame.
DataFrame.astype
Change the data type of a DataFrame, including to boolean.
Series.astype
Change the data type of a Series, including to boolean.
numpy.bool_
NumPy boolean data type, used by pandas for boolean values.
The method will only work for single element objects with a boolean value:
This example is valid syntax, but we were not able to check execution>>> pd.Series([True]).bool() TrueThis example is valid syntax, but we were not able to check execution
>>> pd.Series([False]).bool() FalseThis example is valid syntax, but we were not able to check execution
>>> pd.DataFrame({'col': [True]}).bool() TrueThis example is valid syntax, but we were not able to check execution
>>> pd.DataFrame({'col': [False]}).bool() FalseSee :
The following pages refer to to this document either explicitly or contain code examples using this.
pandas.core.strings.accessor.StringMethods.contains
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them