sqwrl
Sqlachemy Query WRapper Library
Quickstart
Install is easy via pip install sqwrl.
import pandas as pd
from sqwrl import DB
db = DB('sqlite:///:memory:')
df = pd.DataFrame({"x": [1,2,3,4,5], "y": list("abcdf"), "z": [1.0, 1.5, 1.5, 1.2, 1.3]}).set_index("y")
ans_df = pd.read_csv("tests/anscombe.csv")
db["anscombe"] = ans_df
ans_tbl = db["anscombe"]
ans_tbl
Now you can (mostly) use the sqwrl table object as if it were a pandas dataframe!
ans_tbl[ans_tbl["dataset"].isin(["I", "II"])][["x", "y"]]
Use the .df attribute on sqwrl table objects to read their output into pandas DataFrames for any unsupported features.
>>> (ans_tbl.df == ans_df).all().all()
True
See usage for more usage examples.
Basic Features:
- Smart Pandas like wheres using getitem
-
.locoperations - Indexing (including reset_index, drops, and appending)
- Sorting
- Most arithmetic operations lazily pushed
- Metadata like length and dtypes
Advanced Features:
- Groupby
- Groupby group iteration
- Groupby aggregation
- Groupby aggregation over multiple columns
- Groupby group sizes
- Groupby transform and apply
- Joins
- Pandas-style joins (have the basic framework in place for this)
- Mutation
- Adding, deleting, and editing columns
- Appending existing tables
- Deleting or editing based on conditions
Metadata
Release files for sqwrl 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqwrl-0.1.0.tar.gz | 13.5 kB | Without provenance | Details for sqwrl-0.1.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqwrl-0.1.0-py3.8.egg | Legacy Egg format | - | - | Details for sqwrl-0.1.0-py3.8.egg |
| sqwrl-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sqwrl-0.1.0-py3-none-any.whl |
Total release size: 55.7 kB
Release files / sqwrl-0.1.0.tar.gz
| Download URL | sqwrl-0.1.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7e2712a0f46b784178efd63fc32a4ae8e904a9547829cd044926e3ea319f0f0
|
|
BLAKE2b-256 checksum How to use checksums |
8d2290883764c5d4f77d7709c57b5958d7e24fea8aa6d51d1f06ffb52180a4cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Release files / sqwrl-0.1.0-py3.8.egg
| Download URL | sqwrl-0.1.0-py3.8.egg |
|---|---|
| Size | 29.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
c94e8e09c4d0b22a5e4c4d79e02a92fd8ee10653172b585e046542c81a31d139
|
|
BLAKE2b-256 checksum How to use checksums |
4a4dd607b0afbf7797157c53ae613f11efd8182a42bb9208c4520b195a1f588f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Release files / sqwrl-0.1.0-py3-none-any.whl
| Download URL | sqwrl-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
908ca8da06929b556989cdc7871f7885a8ff7ab1768742220ce6ea0855df41cc
|
|
BLAKE2b-256 checksum How to use checksums |
402495a35b5a22826dc076d3561c0d558663847201a1310bab2dae81494c294d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Security for sqwrl 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.