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.6.2.tar.gz
(25.2 kB
view details)
Built Distribution
pyprql-0.6.2-py3-none-any.whl
(30.2 kB
view details)
File details
Details for the file pyprql-0.6.2.tar.gz
.
File metadata
- Download URL: pyprql-0.6.2.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2437bf3fdcc1756c1a520edc248d35e82592a05d934b0954da486c33ad822f2 |
|
MD5 | 2a64197f1ef4cc509abd909aee8262fe |
|
BLAKE2b-256 | 8a0349444a19bb05ca316f5322a18046092f4747d7f423fc9ef4100c0fe4e895 |
Provenance
File details
Details for the file pyprql-0.6.2-py3-none-any.whl
.
File metadata
- Download URL: pyprql-0.6.2-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c3d25f22c3a7d1215edfdcbb700e7192800dbfdac5289d84a74ae3330ce685 |
|
MD5 | 20d3f62d03f72ecb909f7abb9cc7b0db |
|
BLAKE2b-256 | c5a867d97937b58905d9d8ff74a7fec936dcd239b714bcf93403b06d96127871 |