Skip to main content

High Level Expressions for Dask

Project description

Dask Expressions

Dask Dataframes with query optimization.

This is a proof-of-concept rewrite of Dask dataframe that includes query optimization and generally improved organization.

Example

import dask_expr as dx

df = dx.datasets.timeseries()
df.head()

df.groupby("name").x.mean().compute()

Query Representation

Dask-expr encodes user code in an expression tree:

>>> df.x.mean().pprint()

Mean:
  Projection: columns='x'
    Timeseries: seed=1896674884

This expression tree will be optimized and modified before execution:

>>> df.x.mean().optimize().pprint()

Div:
  Sum:
    Fused(375f9):
    | Projection: columns='x'
    |   Timeseries: dtypes={'x': <class 'float'>} seed=1896674884
  Count:
    Fused(375f9):
    | Projection: columns='x'
    |   Timeseries: dtypes={'x': <class 'float'>} seed=1896674884

Stability

This project is a work in progress and will be changed without notice or deprecation warning. Please provide feedback, but it's best to avoid use in production settings.

API Coverage

dask_expr.DataFrame

  • abs
  • add_prefix
  • add_sufix
  • align
  • all
  • any
  • apply
  • assign
  • astype
  • clip
  • combine_first
  • copy
  • count
  • dask
  • drop
  • drop_duplicates
  • dropna
  • eval
  • explode
  • fillna
  • groupby
  • head
  • idxmax
  • idxmin
  • index
  • isin
  • isna
  • join
  • map
  • map_partitions
  • max
  • memory_usage
  • merge
  • min
  • min
  • mode
  • nlargest
  • nsmallest
  • nunique_approx
  • partitions
  • pivot_table
  • prod
  • rename
  • rename_axis
  • repartition
  • replace
  • reset_index
  • round
  • sample
  • sort_values
  • select_dtypes
  • set_index
  • shuffle
  • std
  • sum
  • tail
  • to_parquet
  • to_timestamp
  • var
  • visualize

dask_expr.Series

  • abs
  • align
  • all
  • any
  • apply
  • astype
  • between
  • clip
  • combine_first
  • copy
  • count
  • dask
  • drop_duplicates
  • dropna
  • explode
  • fillna
  • groupby
  • head
  • idxmax
  • idxmin
  • index
  • isin
  • isna
  • map
  • map_partitions
  • max
  • memory_usage
  • min
  • min
  • mode
  • nlargest
  • nsmallest
  • nunique_approx
  • partitions
  • prod
  • rename_axis
  • repartition
  • replace
  • reset_index
  • round
  • shuffle
  • std
  • sum
  • tail
  • to_frame
  • to_timestamp
  • unique
  • value_counts
  • var
  • visualize

dask_expr.Index

  • abs
  • align
  • all
  • any
  • apply
  • astype
  • clip
  • combine_first
  • copy
  • count
  • dask
  • fillna
  • groupby
  • head
  • idxmax
  • idxmin
  • index
  • isin
  • isna
  • map_partitions
  • max
  • memory_usage
  • min
  • min
  • mode
  • nunique_approx
  • partitions
  • prod
  • rename_axis
  • repartition
  • replace
  • reset_index
  • round
  • shuffle
  • std
  • sum
  • tail
  • to_frame
  • to_timestamp
  • var
  • visualize

dask_expr._groupby.GroupBy

  • agg
  • aggregate
  • count
  • first
  • last
  • max
  • mean
  • min
  • prod
  • size
  • std
  • sum
  • value_counts
  • var

Binary operators (DataFrame, Series, and Index):

  • __add__
  • __radd__
  • __sub__
  • __rsub__
  • __mul__
  • __rmul__
  • __truediv__
  • __rtruediv__
  • __lt__
  • __rlt__
  • __gt__
  • __rgt__
  • __le__
  • __rle__
  • __ge__
  • __rge__
  • __eq__
  • __ne__
  • __and__
  • __rand__
  • __or__
  • __ror__
  • __xor__
  • __rxor__

Unary operators (DataFrame, Series, and Index):

  • __invert__
  • __neg__
  • __pos__

Accessors:

  • CategoricalAccessor
  • DatetimeAccessor
  • StringAccessor

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dask-expr-0.1.8.tar.gz (91.3 kB view details)

Uploaded Source

Built Distribution

dask_expr-0.1.8-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

Details for the file dask-expr-0.1.8.tar.gz.

File metadata

  • Download URL: dask-expr-0.1.8.tar.gz
  • Upload date:
  • Size: 91.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for dask-expr-0.1.8.tar.gz
Algorithm Hash digest
SHA256 54b9eecc0f50a27a18f30788ff084329f81af57d1774681ce1da87a76ac96da6
MD5 bc08e7384fe54fe7612de466b2b4f264
BLAKE2b-256 dc506d83d07da77861d8808b0907b3896881acdb26228fca74d0f4b1f2aa99ea

See more details on using hashes here.

Provenance

File details

Details for the file dask_expr-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: dask_expr-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 79.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for dask_expr-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ac902882b9c1c05a4cc5d8f79767559e3256ee64d0034f5773fed572f522c405
MD5 5de74f0fd7996c5da3a3af5ad72d438f
BLAKE2b-256 dfc15dd8628cff02311f6b40e0ae9e1e45e8178e25f1e44bf32eadbe0cb68d6c

See more details on using hashes here.

Provenance

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