I have a 1.5 GB .dat file that I need to import as a pandas dataframe, I'm running into memory issues (8GB RAM). How to I break the dat file into chunks to perform analysis?
Asked
Active
Viewed 659 times
1 Answers
1
pd.read_csv('file.csv', chunksize = x)
returns an iterator giving x lines from file.csv at a time.
Ken Wei
- 2,765
- 1
- 8
- 27