Created
November 21, 2019 13:51
-
-
Save cengizhancaliskan/e2aff781378793454b7615cb02745fc7 to your computer and use it in GitHub Desktop.
Pandas read csv by with chunk for big size CSV files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filename = 'filename.csv' | |
chunksize = 10 ** 6 | |
chunk_list = [] | |
for chunk in pd.read_csv(filename, chunksize=chunksize, error_bad_lines=False): | |
chunk_list.append(chunk) | |
df = pd.concat(chunk_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment