Skip to content

Commit 26fc381

Browse files
committed
Examples for all datasources
1 parent 04c0c14 commit 26fc381

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

doc/source/io.rst

+33
Original file line numberDiff line numberDiff line change
@@ -2477,6 +2477,8 @@ sources into a DataFrame. Currently the following sources are supported:
24772477
24782478
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.
24792479
2480+
Loading Yahoo! Finance data:
2481+
24802482
.. ipython:: python
24812483
24822484
import pandas.io.data as web
@@ -2485,3 +2487,34 @@ It should be noted, that various sources support different kinds of data, so not
24852487
end = datetime(2013, 01, 27)
24862488
f=web.DataReader("F", 'yahoo', start, end)
24872489
f.ix['2010-01-04']
2490+
2491+
Loading Google Finance data:
2492+
2493+
.. ipython:: python
2494+
2495+
import pandas.io.data as web
2496+
from datetime import datetime
2497+
start = datetime(2010, 1, 1)
2498+
end = datetime(2013, 01, 27)
2499+
f=web.DataReader("F", 'google', start, end)
2500+
f.ix['2010-01-04']
2501+
2502+
Loading FRED data:
2503+
2504+
.. ipython:: python
2505+
2506+
import pandas.io.data as web
2507+
from datetime import datetime
2508+
start = datetime(2010, 1, 1)
2509+
end = datetime(2013, 01, 27)
2510+
gdp=web.DataReader("GDP", "fred", start, end)
2511+
gdp.ix['2013-01-01']
2512+
2513+
Loading Fama/French data (the dataset names are listed at `Fama/French Data Library
2514+
<http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html>`_):
2515+
2516+
.. ipython:: python
2517+
2518+
import pandas.io.data as web
2519+
ip=web.DataReader("5_Industry_Portfolios", "famafrench")
2520+
ip[4].ix[192607]

0 commit comments

Comments
 (0)