{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Operators\n", "[[Polars Documentation](https://docs.pola.rs/api/python/stable/reference/expressions/operators.html)]\n", "\n", "All Polars [conjunction](https://docs.pola.rs/api/python/stable/reference/expressions/operators.html#conjunction), \n", "[comparison](https://docs.pola.rs/api/python/stable/reference/expressions/operators.html#comparison), \n", "and [binary](https://docs.pola.rs/api/python/stable/reference/expressions/operators.html#binary) \n", "operators in the linked documentation are supported and are considered row-by-row.\n", "\n", "Even if you are in an aggregation context like `.select` or `.agg`,\n", "OpenDP enforces that inputs to binary operators are row-by-row.\n", "This is to ensure that the left and right arguments of binary operators have meaningful row alignment.\n", "\n", "These operators are particularly useful for building filtering predicates and grouping columns." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
SEX | OVER_40 | len |
---|---|---|
i64 | bool | u32 |
1 | false | 18045 |
1 | true | 22883 |
2 | false | 15838 |
2 | true | 21500 |