Advertisement
jack06215

[pandas] read chunks using pd.io.parsers

Oct 11th, 2020
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. import pandas as pd
  2.  
  3. iterator_data = pd.io.parsers.read_csv(file_, iterator=True, chunksize=2000)
  4. for chunk in iterator_data:
  5.     print(chunk.shape, end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement