Python extensions for PRQL
Project description
pyprql
pyprql contains:
- pyprql.pandas_accessor — Pandas integration for PRQL
- pyprql.magic — IPython magic for connecting to databases using
%%prql
For docs, Check out the pyprql docs, and the PRQL Book.
Installation
pip install pyprql
Usage
Pandas integration
import pandas as pd
import pyprql.pandas_accessor
df = (...)
results_df = df.prql.query('select [age,name,occupation] | filter age > 21')
Jupyter Magic
In [1]: %load_ext pyprql.magic
In [2]: %prql postgresql://user:password@localhost:5432/database
In [3]: %%prql
...: from p
...: group categoryID (
...: aggregate [average unitPrice]
...: )
In [4]: %%prql results <<
...: from p
...: aggregate [min unitsInStock, max unitsInStock]
Support
This project was created by @charlie-sanders & @rbpatt2019 and is now maintained by the broader prql team.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyprql-0.5.11.tar.gz
(21.9 kB
view hashes)
Built Distribution
pyprql-0.5.11-py3-none-any.whl
(25.0 kB
view hashes)