patito.Relation.to_df
- Relation.to_df()
Return a polars DataFrame representation of relation object.
Returns: A
patito.DataFrame
object which inherits frompolars.DataFrame
.Example
>>> import patito as pt >>> pt.Relation("select 1 as column union select 2 as column").order( ... by="1" ... ).to_df() shape: (2, 1) ┌────────┐ │ column │ │ --- │ │ i64 │ ╞════════╡ │ 1 │ ├╌╌╌╌╌╌╌╌┤ │ 2 │ └────────┘
- Return type