reader = pd.read_csv(filename, iterator=True)
## to get first n lines
reader.get_chunk(n)
## to get next n lines and so on
reader.get_chunk(n)
Created
September 21, 2018 13:03
-
-
Save nikhilkumarsingh/40c1e94d8f7068c1de34cf4a2ea5d32d to your computer and use it in GitHub Desktop.
Read CSV files in pandas in lazy manner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment