Skip to content

duckdb.sql(prql.compile()) v.s. df.prql.query()? #156

@eitsupi

Description

@eitsupi

They work almost identically for pandas.DataFrame, and the former would work for polars.DataFrame and pyarrow.Table.

import duckdb
import polars as pl
import prql_python as prql

df = pl.DataFrame({'a': 42})
opts = prql.CompileOptions(target="sql.duckdb")

duckdb.sql(prql.compile("from df", options=opts)).pl()

Probably needs to be mentioned somewhere... (Related to #151)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions