polars.Series.to_init_repr
-
Преобразовать Series в строковое представление, пригодное для создания экземпляра.
- Параметры:
-
- n
-
Использовать только первые n элементов.
См. также
Примеры
>>> s = pl.Series("a", [1, 2, None, 4], dtype=pl.Int16) >>> print(s.to_init_repr()) pl.Series('a', [1, 2, None, 4], dtype=pl.Int16) >>> s_from_str_repr = eval(s.to_init_repr()) >>> s_from_str_repr shape: (4,) Series: 'a' [i16] [ 1 2 null 4 ]
Series.to_init_repr(
n: int = 1000,
) → str_
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.to_init_repr.html