Reading csv zipped files in python

I used the zipfile module to import the ZIP directly to pandas dataframe.
Let’s say the file name is “intfile” and it’s in .zip named “THEZIPFILE”:

import pandas as pd
import zipfile

zf = zipfile.ZipFile('C:/Users/Desktop/THEZIPFILE.zip') 
df = pd.read_csv(zf.open('intfile.csv'))

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)