Advertisement
tvaught

price_utils interaction2

Aug 30th, 2011
3,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. In [8]: price_utils.save_to_db(d, "test.db")
  2. Out[8]: 4186
  3.  
  4. In [9]: d2 = price_utils.load_from_db("VLO", "1995-1-1", "2011-08-24", "test.db")
  5.  
  6. In [10]: d2[0]
  7. Out[10]: ('VLO', datetime.datetime(1995, 1, 3, 0, 0), 10.57, 10.57, 10.41, 10.49, 480400.0, 1.05)
  8.  
  9. In [11]: d2[-1]
  10. Out[11]: ('VLO', datetime.datetime(2011, 8, 24, 0, 0), 20.12, 20.56, 19.8, 20.46, 9280400.0, 20.46)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement