Skip to main content

Chunking for Pandas

codecov Tests

A Python package to chunk pandas/numpy data with different chunking strategies. PyPI package found here: https://pypi.org/project/chunking-pandas/

Requirements

  • Python 3.10+
  • Gradio
  • pandas
  • pytest
  • numpy
  • seaborn
  • matplotlib
  • pyarrow

Installation

pip install chunking-pandas

Or:

make install

Usage

from chunking_pandas import ChunkingExperiment

Create an instance of a Chunking class

class_instance = ChunkingExperiment(
"input.csv",
"output.csv",
n_chunks=3,
chunking_strategy="rows"
)

Then perform the chunking:

class_instance.process_chunks()

Run the web interface

To run as a command, either run:

make run-app

or as a module:

python -m chunking_pandas

Or as a console script:

chunking-interface

Or to run the app programmatically:

from chunking_pandas import launch_interface
launch_interface()

Features

  • Multiple chunking strategies (rows, columns, tokens, blocks, parallel strategies)
  • Support for CSV, JSON, Numpy and Parquet files
  • Web interface using Gradio
  • Comprehensive test suite
  • Documentation using Sphinx
  • Benchmarking various chunking strategies
  • Basic examples contained within examples/

Development

To install development dependencies:

pip install -e .[dev]

Or:

make install-dev

Testing

To run tests, run the following command from the root folder:

pytest

Documentation

To install the documentation dependencies:

pip install -e .[docs]

Or:

make install-docs

To build the documentation:

make docs

To serve the documentation:

make docs-serve

Below are the full list of commands that can be run from the root folder:

make benchmark
make clean
make docs
make docs-clean
make docs-serve
make install
make install-docs
make lint
make run-app
make test
make typecheck

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for chunking-pandas 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chunking-pandas 0.1.8
File Size Uploaded
chunking_pandas-0.1.8.tar.gz 7.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for chunking-pandas 0.1.8
File Interpreter ABI Platform
chunking_pandas-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 MB

Release files / chunking_pandas-0.1.8.tar.gz

Download URL chunking_pandas-0.1.8.tar.gz
Size 7.7 MB
Tags Source
SHA-256 checksum
How to use checksums
4c25f03b9de25e846770ded7b4f2ecff7c82c30706cbcdb97066de7704f23c05
BLAKE2b-256 checksum
How to use checksums
98c32bc624fd7f304cf95ab01f38a98966b5198085154b9943fc73999da8b7c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.15

Release files / chunking_pandas-0.1.8-py3-none-any.whl

Download URL chunking_pandas-0.1.8-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29cf994f583c5a121e7fd3094306720d1c65f695b4650734b307af064ed84b49
BLAKE2b-256 checksum
How to use checksums
6561ddbf737f97e4bda306ff0a2bcec04f2da7200cc760e04d5d0e52e846b6a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.15

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page