pandas_paddles.paddles.combine#

pandas_paddles.paddles.combine(bool_expressions, op=<built-in function and_>)[source]#

Combine multiple DF-expressions to use in df.loc[].

The DF-expressions must evaluate to a boolean array, e.g.,:

DF["col"] > 1
DF["col"].str.startswith("prefix")
DF["col_1"] < DF["col_2"]
Parameters
  • bool_expressions (Iterable[pandas_paddles.pandas.PandasDataframeContext]) – Iterable of DF-expressions that will be combined.

  • op (Callable[[Any, Any], Any]) – The operator to combine the filters. operator.and_() and operator.or_() will be most useful. "and", "&" and "or", "|" are also accepted and the respective operator is used.

Return type

The combined expression.