Skip to content

Commit

Permalink
Examples for all datasources
Browse files Browse the repository at this point in the history
  • Loading branch information
gliptak committed Jun 22, 2013
1 parent 04c0c14 commit 26fc381
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2477,6 +2477,8 @@ sources into a DataFrame. Currently the following sources are supported:
It should be noted, that various sources support different kinds of data, so not all sources implement the same methods and the data elements returned might also differ.
Loading Yahoo! Finance data:
.. ipython:: python
import pandas.io.data as web
Expand All @@ -2485,3 +2487,34 @@ It should be noted, that various sources support different kinds of data, so not
end = datetime(2013, 01, 27)
f=web.DataReader("F", 'yahoo', start, end)
f.ix['2010-01-04']
Loading Google Finance data:
.. ipython:: python
import pandas.io.data as web
from datetime import datetime
start = datetime(2010, 1, 1)
end = datetime(2013, 01, 27)
f=web.DataReader("F", 'google', start, end)
f.ix['2010-01-04']
Loading FRED data:
.. ipython:: python
import pandas.io.data as web
from datetime import datetime
start = datetime(2010, 1, 1)
end = datetime(2013, 01, 27)
gdp=web.DataReader("GDP", "fred", start, end)
gdp.ix['2013-01-01']
Loading Fama/French data (the dataset names are listed at `Fama/French Data Library
<http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html>`_):
.. ipython:: python
import pandas.io.data as web
ip=web.DataReader("5_Industry_Portfolios", "famafrench")
ip[4].ix[192607]

0 comments on commit 26fc381

Please sign in to comment.