Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
In [2]:
:timing
:sccache 1
:dep polars = { version = "0.21.1", features = ["lazy", "parquet"] }
In [13]:
use polars::prelude::*;
ChunkedArray¶
Series¶
In [4]:
let s: Series = [10, 20, 30].iter().collect();
s
Out[4]:
In [5]:
s.len()
Out[5]:
In [6]:
s.get(2)
Out[6]:
In [15]:
match s.get(2) {
AnyValue::Int32(x) => x,
_ => panic!(),
}
Out[15]:
Convert a Series to a ChunkedArray.
In [9]:
{
let ca = s.i32().unwrap();
ca
}
Out[9]:
Get the first element of the ChunkedArray.
In [10]:
{
let ca = s.i32().unwrap();
ca.get(0)
}
Out[10]:
In [ ]: