Skip to main content

Elegant data operations for DataFrames - add.to(), add.transform(), add.synthetic()

Project description

additory

Elegant data operations for DataFrames

A Rust-powered Python library for intuitive data transformations, lookups, synthetic data generation, and DataFrame comparison — with Polars and Pandas.

PyPI version Python Support License: MIT

Installation

pip install additory

Requirements: Python 3.9+ · Polars (required) · pyarrow (required) · Pandas (optional)

Quick Start

import additory as add
import polars as pl

Bring data from another DataFrame

orders = pl.DataFrame({'order_id': [1, 2], 'customer_id': [101, 102], 'amount': [250, 180]})
customers = pl.DataFrame({'customer_id': [101, 102], 'name': ['Alice', 'Bob']})

result = add.to(orders, customers, 'name', 'customer_id')

Transform data

df = pl.DataFrame({'price': [100, 200, 300], 'quantity': [2, 3, 1]})

result = add.transform('@calc', df, strategy={'total': 'price * quantity', 'tax': 'total * 0.1'})
result = add.transform('@filter', df, where='price > 150')
result = add.transform('@sort', df, by='price', strategy='desc')
result = add.transform('@aggregate', df, by='category', strategy={'price': 'sum'})

Generate synthetic data

result = add.synthetic('@new', n=1000, strategy={
    'age': 'normal(40, 10)',
    'salary': 'normal(75000, 15000)',
})

# Augment existing data
result = add.synthetic(df, n=100)

Compare DataFrames

diff = add.scan('@diff', old=df_jan, new=df_feb)

Use dynamic expressions

patients = pl.DataFrame({'weight': [70, 85], 'height': [1.70, 1.80]})
result = add.bmi(patients)

Pipe compatibility

result = (
    orders
    .pipe(add.to, customers, 'name', 'customer_id')
    .pipe(add.to, products, 'price', 'product_id')
)

Core Functions

Function Purpose Pipe-Friendly
add.to(bring_to, bring_from, bring, against, ...) Bring columns from another DataFrame
add.transform(mode, df, ...) Transform data (12 modes)
add.synthetic(df_or_mode, n, ...) Generate or augment data
add.scan(mode, df, ...) Analyze, diff, manage expressions
add.<dynamic>(df, ...) Named expression functions

Transform Modes

@calc · @filter · @sort · @aggregate · @harmonize · @round · @transpose · @extract · @onehot · @label · @deduce · @split

Features

  • 🔗 Intuitive Lookups — bring columns from external sources with natural syntax
  • 12 Transform Modes — calculate, filter, sort, aggregate, encode, impute
  • 🔍 DataFrame Diff — compare snapshots with add.scan('@diff')
  • 🧮 Dynamic Expressions — 74 built-in formulas across 7 categories, extensible via .add files
  • 🎲 Synthetic Data — generate realistic test data or augment existing datasets
  • 📊 Lineage Tracking — trace data provenance with lineage=True
  • 🔄 Pipe Compatibility — fluent chaining with df.pipe()
  • 🚀 Rust Performance — ~95% Rust core via PyO3
  • 🐼 Polars & Pandas — works with both DataFrame libraries

Documentation

📚 sekarkrishna.github.io/additory

Version

Current version: 0.1.3a11

License

MIT License — see LICENSE for details.

Author: Krishnamoorthy Sankaran

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

additory-0.1.3a11.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

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

additory-0.1.3a11-cp313-cp313-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.13Windows x86-64

additory-0.1.3a11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

additory-0.1.3a11-cp313-cp313-macosx_11_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

additory-0.1.3a11-cp312-cp312-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.12Windows x86-64

additory-0.1.3a11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

additory-0.1.3a11-cp312-cp312-macosx_11_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

additory-0.1.3a11-cp311-cp311-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.11Windows x86-64

additory-0.1.3a11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

additory-0.1.3a11-cp311-cp311-macosx_11_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

additory-0.1.3a11-cp310-cp310-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.10Windows x86-64

additory-0.1.3a11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

additory-0.1.3a11-cp310-cp310-macosx_11_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

additory-0.1.3a11-cp39-cp39-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.9Windows x86-64

additory-0.1.3a11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

additory-0.1.3a11-cp39-cp39-macosx_11_0_arm64.whl (10.7 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file additory-0.1.3a11.tar.gz.

File metadata

  • Download URL: additory-0.1.3a11.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for additory-0.1.3a11.tar.gz
Algorithm Hash digest
SHA256 97f6a3c084769aa5b08d75052dcbc6b6b64ba7ff42290468260c9d88b6e94557
MD5 5d7c5924a6a384cee5cf2b13639f6e8c
BLAKE2b-256 310396c434f63dc77e148f9e63d2802b8a7ced891e36242fb5e8cad9ab534f76

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11.tar.gz:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 072c8f27c63b10cfa9d94432c477dc6f9567140d837319ad275a235b8640cd1b
MD5 950ee165443fae5742683452494737d1
BLAKE2b-256 3839157d98531021e63109c2d43f839ce02fcdcc6e361c38f8fc8bd038a61ca9

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp313-cp313-win_amd64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c9fb7667bcf4094c51dfad8466512306fd338e7e72799c1e5c1d17bd4b9989a5
MD5 1bac687b4f383fe2c508dae119ca5ff8
BLAKE2b-256 cfda984d4969aa6e54d37bace9e7d85fee03f8f1a15a0a2b20136fc59f8ddd91

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92b9f193cb56bccc1effea1abab4c2fb3118ed73d33fe28f811588d86ec2f431
MD5 2ecb3fd6da435470345a7defb2c28aee
BLAKE2b-256 ef696f25a0c1c43f567556b652ed546ba427c325048847617d934e68282f4d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9fc5c69da46354f0f749efcfc095f4c3c630819e6ef89f03af34baf04290b1e1
MD5 80cc97a93e6478b10077e9e736aea06a
BLAKE2b-256 437d08997f494632b9fc5056c2c49736c0cdf2a03b5b36aa10a8885fda39af16

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp312-cp312-win_amd64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6391f50175726b0484138e39aaacd0049bfa1d92ce22d4ff2625e548600a41f7
MD5 3702a311caff71052ff047ac21ad026c
BLAKE2b-256 39c6276391fbfbc9937fedd9c3ed400cc0c7435973e67c2da5f1d012cde1d86e

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b293cab63a5ed933be05aa1260e20cb0e61f8a5e710bfe696f58aab51070f44
MD5 a87381567ff68b4745508c7f50caf857
BLAKE2b-256 09db797dd34b05993ec0193343cf16a184f8cc8714006b5345f84e972b8d6970

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8f605cc9d0d4274b62f803d140934ab86e2691f45e7962e8309cfd4176ed88fb
MD5 5088b03f3742c5695e21ab898f56bda9
BLAKE2b-256 583e7f90cc8bca726f57843e414346bc312baa24c6d61bd42219382b423a6cc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp311-cp311-win_amd64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 484a47b3137640f0c45205bc135bef2e4ee354a8e473d5a120d3da40e6d2bef1
MD5 182fe697271ed96ef67e896690bc1bc0
BLAKE2b-256 4e615265c4df04b6e8c758991a68f11082fd388aec477fdec84cd2553c9271ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7708af0c92336e537a3b97391defe6a38fdec2017ed9b07d56b688e03757024f
MD5 96767eff9849e3e1c4da5277bcb3b3b7
BLAKE2b-256 6a9496bc6ea799c5b607726a50fdb5ab4a929bdd3310f974aadfad20dbd5abdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e56ecda2e801badd5c191e7e86b2b6dfed6a8f47c4bb15d62a3e3cd401c7d83b
MD5 1814a82dc472e2f34e915138d2c0fcbc
BLAKE2b-256 3ce55625367f059407b2af04eaf32f4ab68ca0190c2c33ac8655993c89575635

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp310-cp310-win_amd64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46a4954a2b521ac5241146a609113adf6945af8c71ec5980323410d8ab7748e1
MD5 340271dc37684f618e3125fb1358052e
BLAKE2b-256 8be6ccecd4cccdac528574a8639e2e53d985213647241025144ff2f1393054fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4cbc183d4cc96a5cee4bdf2e11c15e83b35bc8eeb86d9007378a45550eea200a
MD5 d8c56dabc88b78ed56057b0e002b1ba0
BLAKE2b-256 e4ef4686fb5f00710ab5c2d51119046bb73e61d4406bc4a4e36dee7b4c31bed8

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: additory-0.1.3a11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for additory-0.1.3a11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3b9addd707d299a14e70fb75ea08125d3c150f7251035db03da1af8b5d6ec347
MD5 98d542133df8b3e1fc940994db20e01b
BLAKE2b-256 e3913b3619f299e18bbc61c7f602410047d1b0f709f6883712c8ab931fe2a6c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp39-cp39-win_amd64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f0988a62c7f741a836670874dcd5b4c4e16e50264bd09d1bb1e4bc0b878fc4b
MD5 177f8bc710953d805949a0a5300af682
BLAKE2b-256 9ed6b866513bf5e168527e29b3a95c710f1fd6121a1ac303b30d5906412bfac4

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on sekarkrishna/additory

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

File details

Details for the file additory-0.1.3a11-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for additory-0.1.3a11-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 72ef886854c9bace3979fad888d1fef119c74fb8aed613b7341d213abd2ee3b4
MD5 32c1cecb8a705f34fdbdd62f7e10944c
BLAKE2b-256 e4d377b482f9f5ca36d7341e4dfd082391d4a1ae631edd051ac8223096cd8ae6

See more details on using hashes here.

Provenance

The following attestation bundles were made for additory-0.1.3a11-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: release.yml on sekarkrishna/additory

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