Skip to main content

registers pyarrow-compute function as expressions to pc namespace

Project description

Polars-pc

Registers pyarrow-compute functions to expressions namespace under "pc". This isn't a rust port, it just calls them as they are with map_batches. All the methods that only have a single input are dynamically loaded. For instance:

df.with_columns(c=pl.col('a').pc.cumulative_sum())

Methods which take two inputs are statically loaded, right now only index_in is loaded and that works like

df.with_columns(c=pl.col('a').pc.index_in('b'))

Install

pip install polars-pc

Usage

import polars_pc
import polars as pl
df=pl.DataFrame({
    'a':[1,2,2,3,4],
    'b':[1,1,1,3,3]
})
df.with_columns(c=pl.col('a').pc.cumulative_sum())
df.with_columns(c=pl.col('a').pc.index_in('b'))

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

polars_pc-0.0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

polars_pc-0.0.2-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

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