Chunking for Pandas
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)
| File | Size | Uploaded | |
|---|---|---|---|
| chunking_pandas-0.1.8.tar.gz | 7.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|