Boolean

class bach.SeriesBoolean

(engine, base_node, index, name, expression, group_by, instance_dtype, order_by=None, **kwargs)

[source]

A Series that represents the Boolean type and its specific operations

Boolean Series can be used to create complex truth expressions like: ~(a & b ^ c), or in more human readable form not(a and b xor c).

~a     not a (invert a)
a & b a and b
a | b a or b
a ^ b a xor b

Type Conversions

Boolean Series can be created from int and string values. Not all conversions errors will be caught on conversion time. Some will lead to database errors later.

Database support and types

  • Postgres: utilizes the ‘boolean’ database type.
  • Athena: : utilizes the ‘boolean’ database type.
  • BigQuery: utilizes the ‘BOOL’ database type.

Methods

SeriesBoolean.max([partition, skipna])Returns the maximum value in the partition, i.e. value will be False iff all values in the partition are False.
SeriesBoolean.min([partition, skipna])Returns the minimum value in the partition, i.e. value will be True iff all values in the partition are True.