You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/io.rst
+22-16
Original file line number
Diff line number
Diff line change
@@ -2464,8 +2464,10 @@ Alternatively, the function :func:`~pandas.io.stata.read_stata` can be used
2464
2464
import os
2465
2465
os.remove('stata.dta')
2466
2466
2467
-
Data
2468
-
----
2467
+
Data Reader
2468
+
-----------
2469
+
2470
+
.. _io.data_reader:
2469
2471
2470
2472
Functions from :mod:`pandas.io.data` extract data from various Internet
2471
2473
sources into a DataFrame. Currently the following sources are supported:
@@ -2477,41 +2479,45 @@ sources into a DataFrame. Currently the following sources are supported:
2477
2479
2478
2480
It should be noted, that various sources support different kinds of data, so notall sources implement the same methods and the data elements returned might also differ.
2479
2481
2480
-
Loading Yahoo! Finance data:
2482
+
Yahoo! Finance
2483
+
~~~~~~~~~~~~~~
2481
2484
2482
2485
.. ipython:: python
2483
2486
2484
2487
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)
2488
2490
f=web.DataReader("F", 'yahoo', start, end)
2489
2491
f.ix['2010-01-04']
2490
2492
2491
-
Loading Google Finance data:
2493
+
Google Finance
2494
+
~~~~~~~~~~~~~~
2492
2495
2493
2496
.. ipython:: python
2494
2497
2495
2498
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)
2499
2501
f=web.DataReader("F", 'google', start, end)
2500
2502
f.ix['2010-01-04']
2501
2503
2502
-
Loading FRED data:
2504
+
FRED
2505
+
~~~~
2503
2506
2504
2507
.. ipython:: python
2505
2508
2506
2509
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)
2510
2512
gdp=web.DataReader("GDP", "fred", start, end)
2511
2513
gdp.ix['2013-01-01']
2512
2514
2513
-
Loading Fama/French data (the dataset names are listed at `Fama/French Data Library
0 commit comments