> ## 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.

# CustomOrder

<span id="atoti.CustomOrder" />

> atoti.CustomOrder(<br />
>     \*,<br />
>     *first\_elements*: [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)\[[bool](https://docs.python.org/3/library/functions.html#bool) | [int](https://docs.python.org/3/library/functions.html#int) | [float](https://docs.python.org/3/library/functions.html#float) | [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) | [time](https://docs.python.org/3/library/datetime.html#datetime.time) | [str](https://docs.python.org/3/library/stdtypes.html#str)],<br />
> )

Custom order.

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> df = pd.DataFrame({"Product": ["TV", "Smartphone", "Computer", "Screen"]})
>>> table = session.read_pandas(df, table_name="Product")
>>> cube = session.create_cube(table)
>>> l, m = cube.levels, cube.measures
>>> cube.query(m["contributors.COUNT"], levels=[l["Product"]])
           contributors.COUNT
Product
Computer                    1
Screen                      1
Smartphone                  1
TV                          1
>>> l["Product"].order = tt.CustomOrder(first_elements=["TV", "Screen"])
>>> cube.query(m["contributors.COUNT"], levels=[l["Product"]])
           contributors.COUNT
Product
TV                          1
Screen                      1
Computer                    1
Smartphone                  1
```

<Callout icon="link">
  **See also**:
  All the available [`orders`](./atoti.order#module-atoti.order).
</Callout>

### Attributes

<h4 id="atoti.CustomOrder.first_elements">
  *first\_elements*
</h4>

> [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)\[[bool](https://docs.python.org/3/library/functions.html#bool) | [int](https://docs.python.org/3/library/functions.html#int) | [float](https://docs.python.org/3/library/functions.html#float) | [date](https://docs.python.org/3/library/datetime.html#datetime.date) | [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) | [time](https://docs.python.org/3/library/datetime.html#datetime.time) | [str](https://docs.python.org/3/library/stdtypes.html#str)]
