diff --git a/doc/source/release.rst b/doc/source/release.rst index 1edb44502221c..dfed47d33151a 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -293,6 +293,7 @@ pandas 0.12 :issue:`4028`, :issue:`4054`) - ``Series.hist`` will now take the figure from the current environment if one is not passed + - Updated documentation to reflect ``data_source`` in ``DataReader`` pandas 0.11.0 ============= diff --git a/doc/source/v0.12.0.txt b/doc/source/v0.12.0.txt index 0d2251bf225d9..63a3fb1e80261 100644 --- a/doc/source/v0.12.0.txt +++ b/doc/source/v0.12.0.txt @@ -249,6 +249,9 @@ I/O Enhancements - ``read_csv`` will now throw a more informative error message when a file contains no columns, e.g., all newline characters + - Updated documentation to reflect ``data_source`` in ``DataReader`` + + Other Enhancements ~~~~~~~~~~~~~~~~~~ diff --git a/pandas/io/data.py b/pandas/io/data.py index b0ee77f11a0a7..dd7fcafdcc0fa 100644 --- a/pandas/io/data.py +++ b/pandas/io/data.py @@ -33,7 +33,7 @@ def DataReader(name, data_source=None, start=None, end=None, name : str the name of the dataset data_source: str - the data source ("yahoo", "fred", or "ff") + the data source ("yahoo", "fred", or "famafrench") start : {datetime, None} left boundary for range (defaults to 1/1/2010) end : {datetime, None} @@ -66,7 +66,7 @@ def DataReader(name, data_source=None, start=None, end=None, retry_count=retry_count, pause=pause) elif(data_source == "fred"): return get_data_fred(name=name, start=start, end=end) - elif(data_source == "famafrench"): + elif((data_source == "famafrench") or (data_source == "ff")): return get_data_famafrench(name=name) diff --git a/pandas/io/tests/test_data_reader.py b/pandas/io/tests/test_data_reader.py index 129e35921335c..59ce69ba54671 100644 --- a/pandas/io/tests/test_data_reader.py +++ b/pandas/io/tests/test_data_reader.py @@ -28,3 +28,7 @@ def test_read_famafrench(self): "F-F_ST_Reversal_Factor"): ff = DataReader(name, "famafrench") assert isinstance(ff, dict) + + # test "ff" data_source option + ff = DataReader(name, "ff") + assert isinstance(ff, dict)