Skip to main content

A booster 💪 for your Parquet files

Project description

virtual

A booster 💪 for your Parquet file sizes.

virtual is a lightweight framework that transparently compresses Parquet files by using functions between columns, all while giving you the same familiar interface you are used to. How virtual works is magic, and is described in our recent research papers (see below).

🛠 Build

pip install virtual-parquet

or

git clone https://github.com/utndatasystems/virtual.git && cd virtual
pip install .

🔗 Examples

A demo can be found at examples/demo-parquet.ipynb.

🗜️ Compress

Simply compress a Pandas DataFrame with virtual.to_format(df):

import pandas as pd
import virtual

df = pd.read_csv('file.csv')

...

virtual.to_format(df, 'file_virtual.parquet')

% Virtualization finished: Check out 'file_virtual.parquet'.

🥢 Read

Reading in a virtual compress parquet file with virtual.from_format([path]):

import virtual

df = virtual.from_format('file_virtual.parquet')

📊 Query

Or directly run SQL queries on the virtualized Parquet file via duckdb with virtual.query([SQL]):

import virtual

virtual.query(
  'select avg(price) from read_parquet("file_virtual.parquet") where year >= 2024',
  engine = 'duckdb'
)

Expert-User Features

🔍 Inspect the Functions Found

import pandas as pd
import virtual

df = pd.read_csv('file.csv')

functions = virtual.train(df)

% Functions saved under functions.json.

📚 Citation

Please do cite our (very) cool work if you use virtual in your work.

@inproceedings{
  virtual,
  title={{Lightweight Correlation-Aware Table Compression}},
  author={Mihail Stoian and Alexander van Renen and Jan Kobiolka and Ping-Lin Kuo and Josif Grabocka and Andreas Kipf},
  booktitle={NeurIPS 2024 Third Table Representation Learning Workshop},
  year={2024},
  url={https://openreview.net/forum?id=z7eIn3aShi}
}

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

virtual_parquet-0.1.3.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

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

virtual_parquet-0.1.3-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file virtual_parquet-0.1.3.tar.gz.

File metadata

  • Download URL: virtual_parquet-0.1.3.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for virtual_parquet-0.1.3.tar.gz
Algorithm Hash digest
SHA256 617e42c71d9731ad272f08b27005a973adabeb39e6fc61b8da35c3e33b7ae514
MD5 38bd0f716153c29f51d8a43584e75e58
BLAKE2b-256 c9dde2d62de738f651e06f0ab16028c52cd75e19bd6ba70b5f5fdec7c61f896c

See more details on using hashes here.

File details

Details for the file virtual_parquet-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for virtual_parquet-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cec378d629295a8a668316a2620dcb0192e8221245d857fa99d4d2bad702f0c2
MD5 68a5dd623bbdf4197764d515beab4737
BLAKE2b-256 56fed028e4f4b838f54d76c8fc53173e0a70c0d27b9fc99419fda4ab6e1f6ec9

See more details on using hashes here.

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