{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Boolean\n", "\n", "[[Polars Documentation](https://docs.pola.rs/api/python/stable/reference/expressions/boolean.html)]\n", "\n", "OpenDP supports a subset of the Polars boolean functions.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "## Is Property\n", "\n", "Since these expressions are row-by-row, they may be used in row-by-row or aggregation contexts.\n", "\n", "- `is_null`\n", "- `is_not_null`\n", "- `is_finite`\n", "- `is_not_finite`\n", "- `is_nan`\n", "- `is_not_nan`\n", "\n", "The latter four only apply to float types that can be NaN or infinite.\n", "\n", "The output domain of `is_null` and `is_not_null` does not include null values, even if the input does.\n", "These expressions can be useful as part of a predicate function for filtering, or as part of a group-by.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Not\n", "\n", "Commonly used for negating predicates.\n", "\n", "Less commonly, the input data to `.not_` may be non-boolean, resulting in a bitwise negation.\n", "In this setting, all domain descriptors about elements in the column are dropped." ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.0" } }, "nbformat": 4, "nbformat_minor": 2 }