Skip to main content

Cut memory footprint by half in just 2 lines of code. Compress Pandas DataFrame without losing information.

Project description

pandazip

Go minimal, go green, go pandazip.

Cut memory footprint by half in just 2 lines of code. Compress Pandas DataFrame without/with losing information. Swift parallel execution.

Install

Shap can be installed from PyPI:

pip install pandazip

Compressing Pandas DataFrame using Pandazip

from pandazip import Pandazip
compressed_dataframe = Pandazip().zip(raw_dataframe)

Lossless Compression

Compression level can be tuned with level parameter. Default is level="low", which is lossless. Every column is converted to the smallest datatype that can store column's data without losing information.

compressed_dataframe = Pandazip().zip(raw_dataframe, level="low")

Lossly Compression

When level parameter is set to "mid" or "high", Pazdazip limits numeric datatypes to 32 and 16 bits respectively. Also, string columns are converted to categoric datatype, if feasable.

compressed_dataframe = Pandazip().zip(raw_dataframe, level="high")

Results

Pandazip is tested on more than 100 Kaggle datasets and notebooks, feel free to share your results.

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

pandazip-0.0.4.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

pandazip-0.0.4-py3-none-any.whl (6.2 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