pandas-datareader is a Python package that downloads macroeconomic, policy, and factor datasets from public internet sources into pandas DataFrames. It supports readers such as FRED, Fama/French, and the pandas_datareader.macro interface.
Overview
pandas-datareader extends pandas with functions to pull time series and tables from remote providers without hand-writing HTTP clients for each site. The maintained API emphasizes macroeconomic, central-bank, and academic factor sources named in the documentation, including FRED, Fama/French factor files, Bank of Canada, World Bank, OECD, Eurostat, and consolidated macro helpers.
Install the package with pip, import it as pandas_datareader, and call the reader that matches your source. Documentation walks through examples such as retrieving U.S. Treasury yield series from FRED by symbol. Optional query caching is documented for repeated requests.
Runtime dependencies include pandas, lxml, and requests; modern Python releases may need setuptools to supply distutils. The library targets analysts and researchers who already work in pandas and want a shared interface to public economic and financial datasets rather than ad hoc downloads.
Key features
- FRED economic series reader
- Fama-French factor data access
- World Bank and OECD connectors
- Eurostat and Bank of Canada readers
- pandas DataFrame output
- Macro data helper interface
- Documented query caching
- pip-installable Python package
Use cases
- Loading FRED bond yield histories
- Pulling Fama-French factors into notebooks
- Comparing OECD macro indicators
- Automating World Bank series downloads
- Building pandas pipelines from public feeds