Seek well, pandas
seekwellpandas (SQL-pandas) is a pandas extension that provides SQL-inspired methods to manipulate DataFrames in a more intuitive way, closely resembling SQL syntax.
Features
seekwellpandas adds several SQL methods to your pandas DataFrames, among them:
SELECT(): Select specific columns, including negative selection.WHERE(): Filter rows based on a condition.GROUP_BY(): Group data by one or more columns.HAVING(): Filter groups based on a condition.ORDER_BY(): Sort data by one or more columns.LIMIT(): Limit the number of returned rows.JOIN(): Join two DataFrames.UNION(): Union two DataFrames.DISTINCT(): Remove duplicates.INTERSECT(): Find the intersection between two DataFrames.DIFFERENCE(): Find the difference between two DataFrames.ADD_COLUMN(): Add a new column based on an expression.RENAME_COLUMN(): Rename a column.CAST(): Change the data type of a column.DROP_COLUMN(): Remove one or more columns.UNPIVOT(): Transform columns into rows (melt).GROUP_HAVING(): Combine grouping and group filtering.
Installation
You can install seekwellpandas via pip:
pip install seekwellpandas
Usage
Here are some examples of how to use SeekwellPandas:
import pandas as pd
import seekwellpandas
# Create a sample DataFrame
df = pd.DataFrame({
'A': [1, 2, 3, 4],
'B': ['a', 'b', 'a', 'b'],
'C': [10, 20, 30, 40]
})
# Select columns
result = df.SELECT('A', 'B')
# Negative selection
result = df.SELECT('-A')
# Filter rows redirecting to .query() (the _ avoids overlapping with pandas.DataFrame.where)
result = df.WHERE('A > 2')
# Group and aggregate
result = df.GROUP_BY('B').AVG('A', "mean_A")
# Sort data
result = df.ORDER_BY('C', ascending=False)
# Add a new column
result = df.ADD_COLUMN('D', 'A * C')
# Join two DataFrames (the _ avoids overlapping with pandas.DataFrame.join)
df2 = pd.DataFrame({'B': ['a', 'b'], 'D': [100, 200]})
result = df.JOIN(df2, on='B')
Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request on my GitHub repository.
License
This project is licensed under the GPLv3 License. See the LICENSE file for details.
Metadata
Release files for seekwellpandas 0.3.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 |
|---|---|---|---|---|
| seekwellpandas-0.3.0.tar.gz | 25.9 kB | Without provenance | Details for seekwellpandas-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seekwellpandas-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for seekwellpandas-0.3.0-py3-none-any.whl |
Total release size: 55.8 kB
Release files / seekwellpandas-0.3.0.tar.gz
| Download URL | seekwellpandas-0.3.0.tar.gz |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78dd4357b3e161538f3ef45b725bad658a0933947aa86a7af8c1b52f038d9765
|
|
BLAKE2b-256 checksum How to use checksums |
b897d095c7c3758d71885ff5b93a47dd78007820a7209704be2477aa597ca3c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / seekwellpandas-0.3.0-py3-none-any.whl
| Download URL | seekwellpandas-0.3.0-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a64057333ad0080a918ca80b47e4e74c53da8d88116a4c9d7954ca30ae47a5e
|
|
BLAKE2b-256 checksum How to use checksums |
4ca7969bbd27a6ceeb07a7fa8f6d32f628c2003698e081b76fc8b1e72294d058
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for seekwellpandas 0.3.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.