Skip to content

DOC: Minor correction to DataReader data_source options #4044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=============
Expand Down
3 changes: 3 additions & 0 deletions doc/source/v0.12.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions pandas/io/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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)


Expand Down
4 changes: 4 additions & 0 deletions pandas/io/tests/test_data_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)