atoti.array.n_lowest module#
- atoti.array.n_lowest(measure, n)#
Return an array measure containing the n lowest elements of the passed array measure.
Example
>>> pnl_table = session.read_csv( ... f"{RESOURCES}/pnl.csv", ... array_separator=";", ... keys=["Continent", "Country"], ... table_name="PnL", ... ) >>> cube = session.create_cube(pnl_table) >>> l, m = cube.levels, cube.measures >>> m["Bottom 3"] = tt.array.n_lowest(m["PnL.SUM"], n=3) >>> cube.query(m["PnL.SUM"], m["Bottom 3"]) PnL.SUM Bottom 3 0 doubleVector[10]{-20.163, ...} doubleVector[3]{-57.51499999999999, ...}
- Return type