Skip to main content

Execute Kusto Query Language (KQL) queries over pandas DataFrames

Project description

adxpandas

PyPI Python

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 / %%kql magic 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.

Links

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

adxpandas-0.2.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adxpandas-0.2.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file adxpandas-0.2.0.tar.gz.

File metadata

  • Download URL: adxpandas-0.2.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for adxpandas-0.2.0.tar.gz
Algorithm Hash digest
SHA256 66368aea5060511c85df533858a99fce6ae2f0aab2151703186f4444330004b2
MD5 6c4308f4b9bfe1eb1a80eb40e87f0056
BLAKE2b-256 368ffd7d139e90d7dd819853d625f6783c6354a472a7c6e538a5db4f978e263c

See more details on using hashes here.

Provenance

The following attestation bundles were made for adxpandas-0.2.0.tar.gz:

Publisher: publish.yml on richarddzh/adxlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file adxpandas-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: adxpandas-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for adxpandas-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4a9ec7b66ed4ea9bbaff1bd9176059a2d9be030eabbdfbb8be6fac020fc9128
MD5 ae1f0074831426952834aad31aaad309
BLAKE2b-256 fda10dbc312976e9cdd68de89cb5ef0c7dc7b7d9bf48c5008ccd748ba99d648e

See more details on using hashes here.

Provenance

The following attestation bundles were made for adxpandas-0.2.0-py3-none-any.whl:

Publisher: publish.yml on richarddzh/adxlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page