Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import pandas as pd
  2. x = pd.HDFStore('test.hf', 'w', append=True)
  3. a = pd.Series([1])
  4. x.append('dframe', a, data_columns=True, index=False)
  5. b = pd.Series([10,2])
  6. x.append('dframe', b, data_columns=True, index=False)
  7. x.close()
  8.  
  9. x = pd.HDFStore('test.hf', 'r')
  10. print(x['dframe'])
  11. x.close()
  12.  
  13. 0 1
  14. 0 10
  15. 1 2
  16. dtype: int64
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement