SHARE
TWEET

Untitled

a guest Nov 19th, 2012 100 Never
  1. 1 from pandas.io.data import DataReader                                                                                        
  2.   2 from datetime import datetime
  3.   3  
  4.   4 dr = DataReader("YHOO", "yahoo")
  5.   5  
  6.   6 print "Yahoo's stock price over time"
  7.   7 print dr["Volume"]
  8.   8  
  9.   9 yh_by_date = DataReader("YHOO",  "yahoo", datetime(2009,1,1))
  10.  10  
  11.  11 print "We want to restrict it based on specific dates"
  12.  12 print yh_by_date["Adj Close"][-100:]
RAW Paste Data
Top