polars.DataFrame.n_chunks
-
Get number of chunks used by the ChunkedArrays of this DataFrame.
- Parameters:
-
-
strategy{‘first’, ‘all’} -
Return the number of chunks of the ‘first’ column, or ‘all’ columns in this DataFrame.
-
Examples
>>> df = pl.DataFrame( ... { ... "a": [1, 2, 3, 4], ... "b": [0.5, 4, 10, 13], ... "c": [True, True, False, True], ... } ... ) >>> df.n_chunks() 1 >>> df.n_chunks(strategy="all") [1, 1, 1]
DataFrame.n_chunks(
strategy: Literal['first',
'all'] = 'first',
) → int | list[int]
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.n_chunks.html