Xorbits SQL: made pandas and SQL APIs work seamlessly together
Xorbits SQL provides a SQL interface built on Xorbits, allowing you to fluidly combine pandas and SQL to solve problems using the most familiar interface.
Xorbits SQL is still at an early development stage and under active improvement. Please feel free to provide feedback if you encounter any issues or have any suggestion.
Key features
🌟 Pandas and SQL APIs in one: The popular pandas and SQL APIs now work seamlessly together.
⚡️Out-of-core and distributed capabilities: Thanks to the underlying Xorbits execution engine, out-of-core and distributed runtimes are natively supported.
🔌 Mainstream SQL dialects compatible: By leveraging SQLGlot as the SQL parser, Xorbits SQL is compatible with many dialects including DuckDB, Presto, Spark, Snowflake, and BigQuery.
Getting Started
Xorbits SQL can be installed via pip from PyPI. It is highly recommended to create a new virtual environment to avoid conflicts.
Installation
$ pip install "xorbits_sql"
Quick Start
Xorbits SQL provides a single API execute() which will return an Xorbits DataFrame.
import xorbits.pandas as pd
import xorbits_sql as xsql
df = pd.DataFrame({"a": [1, 2, 3], "b": ['a', 'b', 'a']})
# SQL
sql = """
select b, AVG(a) as result
from t
group by b
"""
df2 = xsql.execute(
sql,
dialect=None, # optional, replace with SQL dialect, e.g. "duckdb"
tables={'t': df} # register table, table name to Xorbits DataFrame
)
print(df2)
License
Metadata
Release files for xorbits-sql 0.0.1
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 |
|---|---|---|---|---|
| xorbits_sql-0.0.1.tar.gz | 20.8 kB | Without provenance | Details for xorbits_sql-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xorbits_sql-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for xorbits_sql-0.0.1-py3-none-any.whl |
Total release size: 42.9 kB
Release files / xorbits_sql-0.0.1.tar.gz
| Download URL | xorbits_sql-0.0.1.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8ca50071703c1f34c5fdf4372545e206ad1459cd08257fa7b3c521cf0469df6
|
|
BLAKE2b-256 checksum How to use checksums |
0a44861f49be5317a33a2d352db31e4507ef84a9a9d4511515788b78946e0f7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / xorbits_sql-0.0.1-py3-none-any.whl
| Download URL | xorbits_sql-0.0.1-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5dee50d5a990b8bed54a5df540b5ba13ce96508571df6fd0712d638450208169
|
|
BLAKE2b-256 checksum How to use checksums |
473884cd13c1265ad85a47356803b9fbaec67c58402f1eb4f2901d1873d0833c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for xorbits-sql 0.0.1
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.