polars.Series.limit
-
Получить первые
nэлементов.Псевдоним для
Series.head().- Параметры:
-
- n
-
Количество элементов для возврата. Если передано отрицательное значение, вернуть все элементы, кроме последних
abs(n).
См. также
Примеры
>>> s = pl.Series("a", [1, 2, 3, 4, 5]) >>> s.limit(3) shape: (3,) Series: 'a' [i64] [ 1 2 3 ]Передайте отрицательное значение, чтобы получить все строки
exceptпоследниеabs(n).>>> s.limit(-3) shape: (2,) Series: 'a' [i64] [ 1 2 ]
Series.limit(
n: int = 10,
) → Series
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.limit.html