@@ -60,22 +60,22 @@ Yahoo! Finance Options
6060
6161The Options class allows the download of options data from Yahoo! Finance.
6262
63- The '' get_all_data'' method downloads and caches option data for all expiry months
64- and provides a formatted '' DataFrame'' with a hierarchical index, so its easy to get
63+ The `` get_all_data `` method downloads and caches option data for all expiry months
64+ and provides a formatted `` DataFrame `` with a hierarchical index, so its easy to get
6565to the specific option you want.
6666
6767.. ipython :: python
6868
6969 from pandas.io.data import Options
7070 aapl = Options(' aapl' , ' yahoo' )
7171 data = aapl.get_all_data()
72- data.head()
72+ data.iloc[ 0 : 5 :, 0 : 5 ]
7373
74- # Show the $600 strike puts at all expiry dates:
75- data.loc[(600 , slice (None ), ' put' ),:].head()
74+ # Show the $100 strike puts at all expiry dates:
75+ data.loc[(100 , slice (None ), ' put' ),:].iloc[ 0 : 5 :, 0 : 5 ]
7676
77- # Show the volume traded of $600 strike puts at all expiry dates:
78- data.loc[(600 , slice (None ), ' put' ),' Vol' ].head()
77+ # Show the volume traded of $100 strike puts at all expiry dates:
78+ data.loc[(100 , slice (None ), ' put' ),' Vol' ].iloc[ 0 : 5 :, 0 : 5 ]
7979
8080 If you don't want to download all the data, more specific requests can be made.
8181
@@ -84,9 +84,9 @@ If you don't want to download all the data, more specific requests can be made.
8484 import datetime
8585 expiry = datetime.date(2016 , 1 , 1 )
8686 data = aapl.get_call_data(expiry = expiry)
87- data.head()
87+ data.iloc[ 0 : 5 :, 0 : 5 ]
8888
89- Note that if you call '' get_all_data'' first, this second call will happen much faster, as the data is cached.
89+ Note that if you call `` get_all_data `` first, this second call will happen much faster, as the data is cached.
9090
9191
9292.. _remote_data.google :
0 commit comments