{"id":5678,"library":"pandas-datareader","title":"pandas-datareader","description":"Data readers extracted from the pandas codebase, pandas-datareader provides up-to-date remote data access for various financial and economic data sources, compatible with recent pandas versions. The library's release cadence is irregular, largely influenced by the frequent changes in external data provider APIs which often require rapid updates to its readers.","status":"active","version":"0.10.0","language":"en","source_language":"en","source_url":"https://github.com/pydata/pandas-datareader","tags":["data","finance","economics","pandas","api-client"],"install":[{"cmd":"pip install pandas-datareader","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core data structure for returned data.","package":"pandas","optional":false},{"reason":"Required for parsing some web data sources.","package":"lxml","optional":false},{"reason":"Underlying HTTP library for fetching data.","package":"requests","optional":false},{"reason":"Alternative or supplemental reader for Yahoo Finance data, often used when the built-in Yahoo reader is broken due to API changes.","package":"yfinance","optional":true}],"imports":[{"note":"DataReader was moved out of pandas into its own library in pandas v0.19.0.","wrong":"from pandas.io.data import DataReader","symbol":"DataReader","correct":"from pandas_datareader.data import DataReader"},{"note":"Common alias for the top-level module functions like get_data_fred.","symbol":"pandas_datareader as pdr","correct":"import pandas_datareader as pdr"},{"note":"Common alias for the data submodule containing DataReader and various source-specific readers.","symbol":"pandas_datareader.data as web","correct":"import pandas_datareader.data as web"}],"quickstart":{"code":"import pandas_datareader.data as web\nimport datetime\n\nstart = datetime.datetime(2020, 1, 1)\nend = datetime.datetime(2023, 1, 1)\n\n# Fetch data from FRED (Federal Reserve Economic Data)\ngs10 = web.DataReader('GS10', 'fred', start, end)\n\nprint(gs10.head())","lang":"python","description":"This example fetches the 10-Year Treasury Constant Maturity Rate (GS10) from FRED (Federal Reserve Economic Data) for a specified date range and prints the first few rows. FRED is generally reliable and does not require an API key for basic usage."},"warnings":[{"fix":"Upgrade your Python environment to 3.6 or newer. Python 3.8+ is recommended.","message":"Dropped support for Python 2.7 in v0.9.0. The minimum required Python version is now 3.6.","severity":"breaking","affected_versions":"0.9.0 and later"},{"fix":"Register for an API key on IEX Cloud and set it as an environment variable (e.g., `os.environ[\"IEX_API_KEY\"] = \"pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"`) or pass it directly to the reader.","message":"IEX Cloud API Key Requirement: From v0.8.0, all IEX readers require an API token (`IEX_API_KEY`).","severity":"breaking","affected_versions":"0.8.0 and later"},{"fix":"Switch to alternative data sources or use a different library if these specific sources are critical to your workflow.","message":"Removal or immediate deprecation of several data sources: Google Finance, Morningstar, and Robinhood were removed (deprecated in v0.7.0, removed in v0.8.0, Robinhood removed in v0.9.0). The AlphaVantage quote reader and Enigma were immediately deprecated in v0.9.0 due to API changes or service termination.","severity":"breaking","affected_versions":"0.8.0 and later"},{"fix":"Ensure you are on the latest `pandas-datareader` version. If issues persist, consider using the `yfinance` library directly or another robust financial data provider.","message":"Yahoo Finance reader instability: The Yahoo Finance API is prone to frequent, unannounced changes, often leading to `RemoteDataError` or incorrect data. While v0.10.0 included fixes for Yahoo readers, it remains a common point of failure for users.","severity":"gotcha","affected_versions":"All versions, especially prior to 0.10.0, and intermittently thereafter."},{"fix":"Check the project's GitHub issues for known broken readers. For critical data, consider direct API integration or using dedicated client libraries for specific data providers.","message":"General API instability and lack of frequent updates: Many data sources continuously change their APIs, causing readers in `pandas-datareader` to break. There is an acknowledged challenge in maintaining all readers, leading to periods where certain data sources may not function correctly between releases.","severity":"gotcha","affected_versions":"All versions, ongoing concern."},{"fix":"Monitor `pandas-datareader` GitHub issues and releases for updates on `pandas` 3.0 compatibility. Consider pinning your `pandas` version to a compatible older release if you encounter problems.","message":"Potential incompatibility with Pandas 3.0: There are indications of anticipated breaking changes related to `pandas` 3.0. Users upgrading `pandas` to version 3.0 or higher may encounter issues.","severity":"gotcha","affected_versions":"Potentially 0.10.0 with pandas 3.0+"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}