Advertisement
jack06215

[pandas] save to hdf by parts

Oct 11th, 2020
77
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. store = pd.HDFStore('file.h5',mode='w')
  4. for chunk in read_csv('file.csv',chunksize=50000):
  5.          store.append('df',chunk)
  6. store.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement