Convert the given relation to a polars Series.
TypeError – If the given relation does not contain exactly one column.
polars.Seriesobject containing the data of the relation.
- Return type:
>>> import patito as pt >>> relation = pt.duckdb.Relation("select 1 as a union select 2 as a") >>> relation.order(by="a").to_series() shape: (2,) Series: 'a' [i32] [ 1 2 ]