Skip to content

Instantly share code, notes, and snippets.

@beyoung
Created May 29, 2019 07:34
Show Gist options
  • Save beyoung/3079a34c7cf2c7903f925c992f5ac321 to your computer and use it in GitHub Desktop.
Save beyoung/3079a34c7cf2c7903f925c992f5ac321 to your computer and use it in GitHub Desktop.
from snappy import snappy_formats
method = snappy_formats.get_compress_function(snappy_formats.DEFAULT_FORMAT)
out_file = 'out_file.snappy'
with open('in_file.csv', 'r') as fr, open(out_file, 'w') as fw:
method(fr, fw)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment