Skip to main content

A wrapper around a Pandas DataFrame which allows you to use the syntax of the Kusto Query Language to transform the DataFrame

Project description

KustoPandas is a wrapper around a Pandas DataFrame which allows you to use the syntax of the Kusto Query Language to transform the data frame. Under the hood the commands are converted to the corresponding Pandas method, so you get all the performance of Pandas, but with the nice syntax of Kusto.

For installation use pip

python -m pip install kusto_pandas

See the following jupyter notebooks for example usage

KustoPandas walkthrough

Trump approval ratings

Here are some very basic usage examples. Please see the walkthrough above for more details.

import pandas as pd
from kusto_pandas import Wrap
dataframe = pd.read_csv("data.csv")
w = Wrap(dataframe)

w.where("Column1 > 0").summarize("count(), AvgOfCol1 = avg(Column1) by Column2")

In the above, multiple tabular operators are chained together, however if you prefer you can enter the full Kusto query

w.execute("""
w
| where Column1 > 0
| summarize count(), AvgOfCol1 = avg(Column1) by Column2
""")

If you are working in a Jupyter notebook, then you may find it more convenient to use an IPython magic

Kusto magic impage

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

kusto_pandas-0.1.0.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

kusto_pandas-0.1.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file kusto_pandas-0.1.0.tar.gz.

File metadata

  • Download URL: kusto_pandas-0.1.0.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.5

File hashes

Hashes for kusto_pandas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 148e05cbad39a57fb123c09701c27ba591cdfdbe4593c82ffb1219076abe6460
MD5 97f289ed56e4bcd82b25b0a0b6d5e48d
BLAKE2b-256 c0fa82d5929acd3fdd708400090ce97fe9e064ae577aecce03973abf009720c5

See more details on using hashes here.

File details

Details for the file kusto_pandas-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kusto_pandas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e0efe0aec689267d5976a165e658acd75f181c385ea159dd28f26417ebe7d4a
MD5 e19be1bf60f489e83e85120eb4aa1a2b
BLAKE2b-256 2c723c031c2dd8c4ba7a538f6ef1474368c1e0fa0947afd461eb101a2c52ea67

See more details on using hashes here.

Supported by

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