Spec-Zone.ru › Polars

polars.Config.set_tbl_rows

classmethod Config.set_tbl_rows(
    n: int | None,
) → type[Config]

Set the max number of rows used to draw the table (both Dataframe and Series).

Parameters:
nint

Number of rows to display; if n < 0 (eg: -1), display all rows (DataFrame) and all elements (Series).

Examples

>>> df = pl.DataFrame(
...     {"abc": [1.0, 2.5, 3.5, 5.0], "xyz": [True, False, True, False]}
... )
>>> with pl.Config(tbl_rows=2):
...     print(df)
shape: (4, 2)
┌─────┬───────┐
│ abc ┆ xyz   │
│ --- ┆ ---   │
│ f64 ┆ bool  │
╞═════╪═══════╡
│ 1.0 ┆ true  │
│ …   ┆ …     │
│ 5.0 ┆ false │
└─────┴───────┘

© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/api/polars.Config.set_tbl_rows.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API