Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Using Machine Learning to learn how to Compress

Project description

PyPI PyPI HitCount

Try it live at https://shrynk.ai

Usage

Installation:

pip install shrynk

Then in Python:

from shrynk.pandas import save, load
file_path = save(my_df, "mypath")
# e.g. mypath.csv.bz2
loaded_df = load(file_path)

Add your own data

If you want more control you can do the following:

import pandas as pd
from shrynk.pandas import PandasCompressor

df = pd.DataFrame({"a": [1, 2, 3]})

pdc = PandasCompressor("default")
pdc.run_benchmarks([df], save=False) # adds data to the default

pdc.train_model(size=3, write=1, read=1)

pdc.infer(df)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for shrynk, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size shrynk-0.0.6-py2.py3-none-any.whl (504.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size shrynk-0.0.6.tar.gz (7.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page