I am trying to open a .csv compressed to a .lzma file in Linux using the following code:
import lzma
import pandas as pd
myfile= \'/home/stacey/work/roll_158_oe
Apparently you need to call a class from the lzma
module to open the file:
import lzma # python 3, try lzmaffi in python 2
with open('one-csv-file.xz') as compressed:
with lzma.LZMAFile(compressed) as uncompressed:
for line in uncompressed:
do_stuff_with(line)
Extracted from How to open and read LZMA file in-memory