Snips & Tips
Ask or search…
K

Polars Dataframe Library

Some useful tips about polars dataframe library

Using SQL queries inside polars

res = pl.SQLContext(frame=df).execute(
"""
with cte as (
SELECT customer_id, primary_term, final_term from frame where primary_term > final_term limit 100
)
select * from cte order by primary_term desc limit 10
"""
)
res.collect()

Polars basic

Oops, something is missing.We could not find the original source to display this content.