Skip to content

Commit 4c3cf70

Browse files
committed
DOC: reformat io.rst/data reader
1 parent 26fc381 commit 4c3cf70

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

doc/source/io.rst

+22-16
Original file line numberDiff line numberDiff line change
@@ -2464,8 +2464,10 @@ Alternatively, the function :func:`~pandas.io.stata.read_stata` can be used
24642464
import os
24652465
os.remove('stata.dta')
24662466
2467-
Data
2468-
----
2467+
Data Reader
2468+
-----------
2469+
2470+
.. _io.data_reader:
24692471
24702472
Functions from :mod:`pandas.io.data` extract data from various Internet
24712473
sources into a DataFrame. Currently the following sources are supported:
@@ -2477,41 +2479,45 @@ sources into a DataFrame. Currently the following sources are supported:
24772479
24782480
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.
24792481
2480-
Loading Yahoo! Finance data:
2482+
Yahoo! Finance
2483+
~~~~~~~~~~~~~~
24812484
24822485
.. ipython:: python
24832486
24842487
import pandas.io.data as web
2485-
from datetime import datetime
2486-
start = datetime(2010, 1, 1)
2487-
end = datetime(2013, 01, 27)
2488+
start = datetime.datetime(2010, 1, 1)
2489+
end = datetime.datetime(2013, 01, 27)
24882490
f=web.DataReader("F", 'yahoo', start, end)
24892491
f.ix['2010-01-04']
24902492
2491-
Loading Google Finance data:
2493+
Google Finance
2494+
~~~~~~~~~~~~~~
24922495
24932496
.. ipython:: python
24942497
24952498
import pandas.io.data as web
2496-
from datetime import datetime
2497-
start = datetime(2010, 1, 1)
2498-
end = datetime(2013, 01, 27)
2499+
start = datetime.datetime(2010, 1, 1)
2500+
end = datetime.datetime(2013, 01, 27)
24992501
f=web.DataReader("F", 'google', start, end)
25002502
f.ix['2010-01-04']
25012503
2502-
Loading FRED data:
2504+
FRED
2505+
~~~~
25032506
25042507
.. ipython:: python
25052508
25062509
import pandas.io.data as web
2507-
from datetime import datetime
2508-
start = datetime(2010, 1, 1)
2509-
end = datetime(2013, 01, 27)
2510+
start = datetime.datetime(2010, 1, 1)
2511+
end = datetime.datetime(2013, 01, 27)
25102512
gdp=web.DataReader("GDP", "fred", start, end)
25112513
gdp.ix['2013-01-01']
25122514
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+
Fama/French
2517+
~~~~~~~~~~~
2518+
2519+
Tthe dataset names are listed at `Fama/French Data Library
2520+
<http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html>`_)
25152521
25162522
.. ipython:: python
25172523

0 commit comments

Comments
 (0)