Skip to content

Commit 38ef0c7

Browse files
authored
Merge pull request #576 from bashtage/update-docs-0.7
DOC: Fix documentation errors
2 parents 6c17cf7 + 4ef084d commit 38ef0c7

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

docs/source/cache.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Below is an example with Yahoo! Finance. The session parameter is implemented fo
3636
start = datetime.datetime(2010, 1, 1)
3737
end = datetime.datetime(2013, 1, 27)
3838
f = web.DataReader("F", 'yahoo', start, end, session=session)
39-
f.ix['2010-01-04']
39+
f.loc['2010-01-04']
4040
4141
A `SQLite <https://www.sqlite.org/>`_ file named ``cache.sqlite`` will be created in the working
4242
directory, storing the request until the expiry date.

docs/source/remote_data.rst

+10-11
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ prices are available for up to 5 years:
7777
7878
import pandas_datareader.data as web
7979
from datetime import datetime
80-
start = datetime(2015, 2, 9)
81-
end = datetime(2017, 5, 24)
80+
start = datetime(2016, 9, 1)
81+
end = datetime(2018, 9, 1)
8282
f = web.DataReader('F', 'iex', start, end)
83-
f.loc['2015-02-09']
83+
f.loc['2018-08-31']
8484
8585
There are additional interfaces to this API that are
8686
directly exposed: tops (`'iex-tops'`) and last (`'iex-lasts'`).
@@ -109,8 +109,7 @@ year relative to today.
109109
f = web.DataReader('F', 'robinhood')
110110
f.head()
111111
112-
113-
.. _remote_data.alphavantage
112+
.. _remote_data.alphavantage:
114113

115114
Alpha Vantage
116115
=============
@@ -270,7 +269,7 @@ FRED
270269
start = datetime.datetime(2010, 1, 1)
271270
end = datetime.datetime(2013, 1, 27)
272271
gdp = web.DataReader('GDP', 'fred', start, end)
273-
gdp.ix['2013-01-01']
272+
gdp.loc['2013-01-01']
274273
275274
# Multiple series:
276275
inflation = web.DataReader(['CPIAUCSL', 'CPILFESL'], 'fred', start, end)
@@ -305,7 +304,7 @@ World Bank
305304
by using the ``wb`` I/O functions.
306305

307306
Indicators
308-
----------
307+
^^^^^^^^^^
309308

310309
Either from exploring the World Bank site, or using the search function included,
311310
every world bank indicator is accessible.
@@ -316,7 +315,7 @@ constant dollars in North America, you would use the ``search`` function:
316315
.. code-block:: python
317316
318317
In [1]: from pandas_datareader import wb
319-
In [2]: mathces = wb.search('gdp.*capita.*const')
318+
In [2]: matches = wb.search('gdp.*capita.*const')
320319
321320
322321
Then you would use the ``download`` function to acquire the data from the World
@@ -417,7 +416,7 @@ populations in rich countries tend to use cellphones at a higher rate:
417416
==============================================================================
418417
419418
Country Codes
420-
-------------
419+
^^^^^^^^^^^^^
421420
422421
The ``country`` argument accepts a string or list of mixed
423422
`two <http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`__ or `three <http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3>`__ character
@@ -426,7 +425,7 @@ ISO country codes, as well as dynamic `World Bank exceptions <https://datahelpde
426425
For a list of the the hard-coded country codes (used solely for error handling logic) see ``pandas_datareader.wb.country_codes``.
427426
428427
Problematic Country Codes & Indicators
429-
--------------------------------------
428+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
430429
431430
.. note::
432431
@@ -533,7 +532,7 @@ available. More information on the `field <http://www.nasdaqtrader.com/trader.as
533532
534533
In [12]: from pandas_datareader.nasdaq_trader import get_nasdaq_symbols
535534
In [13]: symbols = get_nasdaq_symbols()
536-
In [14]: print(symbols.ix['IBM'])
535+
In [14]: print(symbols.loc['IBM'])
537536
Nasdaq Traded True
538537
Security Name International Business Machines Corporation Co...
539538
Listing Exchange N

docs/source/whatsnew/v0.7.0.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _whatsnew_070:
22

3-
v0.7.0 (Xxxxxxx YY, 20ZZ)
3+
v0.7.0 (September 11, 2018)
44
---------------------------
55

66
.. warning::
@@ -32,19 +32,19 @@ Enhancements
3232
introduced to obtain historical time series data.
3333
(:issue:`389`)
3434

35-
- A new data connector for data provided by
36-
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ was
37-
introduced to obtain sector performance data, accessed through the
38-
top-level function ``get_sector_performance_av``.
39-
(:issue:`389`)
35+
- A new data connector for data provided by
36+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ was
37+
introduced to obtain sector performance data, accessed through the
38+
top-level function ``get_sector_performance_av``.
39+
(:issue:`389`)
4040

41-
- A new data connector for data provided by
41+
- A new data connector for data provided by
4242
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ was
4343
introduced to obtain real-time Batch Stock Quotes through the
4444
top-level function ``get_quote_av``.
4545
(:issue:`389`)
4646

47-
- MOEX data connector now supports multiple symbols in constructor.
47+
- MOEX data connector now supports multiple symbols in constructor.
4848
(:issue:`562`)
4949

5050
.. _whatsnew_070.api_breaking:

pandas_datareader/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
get_iex_symbols, get_last_iex, get_markets_iex,
88
get_nasdaq_symbols,
99
get_quote_google, get_quote_yahoo, get_recent_iex,
10-
get_records_iex, get_summary_iex, get_tops_iex)
10+
get_records_iex, get_summary_iex, get_tops_iex,
11+
get_data_tiingo, get_data_alphavantage)
1112

1213
__version__ = get_versions()['version']
1314
del get_versions
@@ -20,4 +21,5 @@
2021
'get_summary_iex', 'get_tops_iex',
2122
'get_nasdaq_symbols', 'get_data_quandl', 'get_data_moex',
2223
'get_data_fred', 'get_dailysummary_iex', 'get_data_morningstar',
23-
'get_data_stooq', 'DataReader', 'Options']
24+
'get_data_stooq', 'DataReader', 'Options',
25+
'get_data_tiingo', 'get_data_alphavantage']

pandas_datareader/fred.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def fetch_data(url, name):
4646
try:
4747
return data.truncate(self.start, self.end)
4848
except KeyError: # pragma: no cover
49-
if data.ix[3].name[7:12] == 'Error':
49+
if data.iloc[3].name[7:12] == 'Error':
5050
raise IOError("Failed to get the data. Check that "
5151
"{0!r} is a valid FRED series.".format(name))
5252
raise

0 commit comments

Comments
 (0)