Execute Kusto Query Language (KQL) queries over pandas DataFrames
Project description
adxpandas
Execute Kusto Query Language (KQL) queries directly over one or more pandas DataFrames — no database required.
Installation
pip install adxpandas
For Jupyter notebook support (magic commands and chart rendering):
pip install adxpandas[notebook]
Quick Start
import pandas as pd
from adxpandas import AdxPandasClient
df = pd.DataFrame({
"name": ["Ada", "Alan", "Grace"],
"city": ["London", "London", "Arlington"],
"score": [10, 20, 30],
})
client = AdxPandasClient({"Users": df})
result = client.query('Users | where city == "London" | project name, score')
print(result)
Wrap: Quick Single-DataFrame Queries
from adxpandas import Wrap
w = Wrap(df)
result = w.execute('self | where city == "London" | project name, score')
print(result.df)
# Method chaining
w.where('city == "London"').project("name", "score").take(5).df
Jupyter Magic
import adxpandas.magic # registers %kql magic
# Line magic
%kql df | where city == "London" | take 5
# Cell magic
%%kql
df
| where score > 10
| summarize count() by city
Render Charts
w = Wrap(df)
w.execute('self | summarize avg(score) by city | render barchart')
Features
- Pure pandas execution — no SQLite or other database dependencies
- Full KQL parser with support for common operators
- Operators: where, project, project-away, extend, summarize, sort, top, take, distinct, count, parse, join, union, render
- Wrap class for quick single-DataFrame queries with method chaining
- Jupyter
%kql/%%kqlmagic for interactive notebooks - Chart rendering: timechart, barchart, columnchart, piechart, linechart
- Scalar functions: string, math, datetime operations
- Aggregate functions: count, sum, avg, min, max, dcount, countif, sumif, avgif
- let statements (scalar and tabular)
- Union source form queries
Documentation
See the full documentation for comprehensive guides covering both adxlite and adxpandas.
Acknowledgments
Some functionality in adxpandas was inspired by and references KustoPandas. We thank the KustoPandas authors for their pioneering work on KQL-over-pandas execution.
Links
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adxpandas-0.2.2.tar.gz.
File metadata
- Download URL: adxpandas-0.2.2.tar.gz
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faa547db1130598784d5afaa1a1d54a76f99d0808e05ad4f1fefc14f076a2b00
|
|
| MD5 |
b5a4b293402658720399d84ad875bed9
|
|
| BLAKE2b-256 |
06a3bfc1b29aa072d2d3ad01a83af36e96108844213a866ffbd26bfddbff71bc
|
Provenance
The following attestation bundles were made for adxpandas-0.2.2.tar.gz:
Publisher:
publish.yml on richarddzh/adxlite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adxpandas-0.2.2.tar.gz -
Subject digest:
faa547db1130598784d5afaa1a1d54a76f99d0808e05ad4f1fefc14f076a2b00 - Sigstore transparency entry: 1702248003
- Sigstore integration time:
-
Permalink:
richarddzh/adxlite@abf255853ca8c2bebc9a2c14f1f18c5d1e352fa4 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/richarddzh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abf255853ca8c2bebc9a2c14f1f18c5d1e352fa4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file adxpandas-0.2.2-py3-none-any.whl.
File metadata
- Download URL: adxpandas-0.2.2-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
272e44a42df259f85e209bc7fdb1971518bc73b329f18f116daac26698d87872
|
|
| MD5 |
159dfd994cef5cabc77e44f3e88d47ed
|
|
| BLAKE2b-256 |
4876ae512ee52a5ddc04a46ef05c5aef4ceafe59ffa676969edec269ed1c684a
|
Provenance
The following attestation bundles were made for adxpandas-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on richarddzh/adxlite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adxpandas-0.2.2-py3-none-any.whl -
Subject digest:
272e44a42df259f85e209bc7fdb1971518bc73b329f18f116daac26698d87872 - Sigstore transparency entry: 1702248081
- Sigstore integration time:
-
Permalink:
richarddzh/adxlite@abf255853ca8c2bebc9a2c14f1f18c5d1e352fa4 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/richarddzh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abf255853ca8c2bebc9a2c14f1f18c5d1e352fa4 -
Trigger Event:
release
-
Statement type: