Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
Level.isnull()
Return a condition evaluating to True where this level is not expressed, and evaluating to False elsewhere.
Example
>>> df = pd.DataFrame(
... columns=["Country", "City", "Price"],
... data=[
... ("France", "Paris", 200.0),
... ("Germany", "Berlin", 120),
... ],
... )
>>> table = session.read_pandas(df, table_name="Example")
>>> cube = session.create_cube(table)
>>> l, m = cube.levels, cube.measures
>>> condition = l["City"].isnull()
>>> condition
l['Example', 'City', 'City'].isnull()
>>> m["City.isnull"] = condition
>>> m["City.notnull"] = ~condition
>>> cube.query(
... m["City.isnull"],
... m["City.notnull"],
... levels=[l["Country"], l["City"]],
... include_totals=True,
... )
City.isnull City.notnull
Country City
Total True False
France True False
Paris False True
Germany True False
Berlin False True
- Return type:
RelationalCondition[TypeAliasForwardRef, Literal[‘EQ’], NoneType]