Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native support for reading compressed files #3938

Open
jabraham17 opened this issue Dec 12, 2024 · 0 comments
Open

Native support for reading compressed files #3938

jabraham17 opened this issue Dec 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jabraham17
Copy link
Contributor

Feature Description
It would be nice if compressed files could be read directly by Arkouda. There is already some support for this for file types that have built-in compression (like parquet), but other file types can be compressed. My main example of this is a compressed csv file, which must be decompressed before ak.read_csv can be called.

In pure python+pandas, this can be cleanly done as follows

import pandas as pd
import bz2
with bz2.open("myCsv.bz2") as bzf:
  df = pd.read_csv(bzf)

This works because pd.read_csv takes either a filename or a file handle.

Example Behavior

My proposal for this would be something as follows

import arkouda as ak
data = ak.read_csv("myCsv.bz2", compression='bz2')

Here, compression (or decompress?) would inform the arkouda server about how it should do the decompression

Describe Workarounds

Currently, this is possible with a preprocessing script that either just decompresses the CSV or converts the compressed CSV to a compressed format that arkouda does support natively, like parquet.

@jabraham17 jabraham17 added the enhancement New feature or request label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant