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.10.tar.gz
(22.1 kB
view details)
Built Distribution
pyprql-0.5.10-py3-none-any.whl
(25.3 kB
view details)
File details
Details for the file pyprql-0.5.10.tar.gz
.
File metadata
- Download URL: pyprql-0.5.10.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e578c2693fd451b6a87bebee21aebb5798870b4c609f16317ef537981e8a99a |
|
MD5 | 86f4196248812a13234ee8dcc12eb1bd |
|
BLAKE2b-256 | 7aea0d77f7f980d51b1e8651dc1298e5171beb3b2fae7c5926b3e62b808e1bc4 |
Provenance
File details
Details for the file pyprql-0.5.10-py3-none-any.whl
.
File metadata
- Download URL: pyprql-0.5.10-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02b794157beb1b72baf2a195d7d8e85ca7ab980b9c195e261a38e15da278a5b2 |
|
MD5 | dde4ad9419c23a0b8fdeb8e317b782b7 |
|
BLAKE2b-256 | cec380ce714da4617abd7247e203cfd7bda38af7616a487bfb3a3d5bcbb78295 |