Pandas: Convert Winzipped Csv File To Data Frame
I have a couple of WinZipped csv files and would like to read these in as a Pandas dataframe. The problem is that neither of the decompression options ('gzip' or 'bz2') seems to wo
Solution 1:
You just need to unzip the file:
with zipfile.ZipFile('/path/to/file', 'r') as z:
f = z.open('member.csv')
table = pd.io.parsers.read_table(f, ...)
The filepath_or_buffer
parameter to read_table
accepts any file-like argument.
Post a Comment for "Pandas: Convert Winzipped Csv File To Data Frame"