pylhc / tfs

Python package to handle TFS files
https://pylhc.github.io/tfs/
MIT License
9 stars 4 forks source link

[Feature]: reading and writing compressed files #113

Closed fsoubelet closed 1 year ago

fsoubelet commented 1 year ago

Compression Handling Feature

This closes #112 by introducing in the reader and writer the ability to manage compression. This handling is fully done on the pandas side.

Supported compression formats are the ones supported by pandas.read_csv itself: .gz, .bz2, .zip, .xz, .zst, .tar, .tar.gz, .tar.xz or .tar.bz2.

Mandatory big thanks to Andrey Abramov who suggested the implementation and simplified this a lot for me.

The changes are:

Examples

Importantly, thanks to pandas this new functionality is completely transparent to the user. The compression format is inferred from the file extension and managed automatically. See below for an example:

Screenshot 2023-02-09 at 15 58 04

Caveats / to be discussed: