polars.Array#
- class polars.Array(*args: Any, **kwargs: Any)[source]#
Nested list/array type with fixed length of inner arrays.
- __init__(width: int, inner: PolarsDataType | PythonDataType = Null)[source]#
Nested list/array type with fixed length of inner arrays.
- Parameters:
- width
The fixed size length of the inner arrays.
- inner
The DataType of values within the inner arrays
Examples
>>> s = pl.Series( ... "a", [[1, 2], [4, 3]], dtype=pl.Array(width=2, inner=pl.Int64) ... ) >>> s shape: (2,) Series: 'a' [array[i64, 2]] [ [1, 2] [4, 3] ]
Methods
__init__
(width[, inner])Nested list/array type with fixed length of inner arrays.
base_type
()Return this DataType's fundamental/root type class.
is_
(other)Check if this DataType is the same as another DataType.
is_not
(other)Check if this DataType is NOT the same as another DataType.
Attributes
inner
is_nested
width