0

I use pandas.datareader to download FRED data. The code is quite simple and worked well. I updated pandas and pandas-datareader in the new version of my software and since then it doesn't work anymore.

import pandas_datareader
import pandas as pd

downloader = pandas_datareader.fred
df_idx = downloader.FredReader('USD1MTD156N', start='1986-01-02', end='2021-06-30').read()

There are similar answers (for Yahoo) to this problem (for example: How to fix new unable to read URL error in python for yahoo finance). But I don't find them very clear and so I can't find a solution adapted to the FRED case. Of course I would like to keep up to date with pandas and pandas-datareader versions.

error: RemoteDataError}Unable to read URL: https://fred.stlouisfed.org/graph/fredgraph.csv? id=USD1MTD156N Response Text:

pandas version: 1.4.2
pandas-datareader: 0.10.0
Mayank Porwal
  • 33,470
  • 8
  • 37
  • 58
Gilles Criton
  • 673
  • 1
  • 13
  • 27
  • what's the data you're looking to download exactly ? is it economical indicators or prices? – Ran A Jun 20 '22 at 15:17
  • Actually both. Why? is there a difference in the way of downloading the data? – Gilles Criton Jun 20 '22 at 15:41
  • because i fond a way for the economic indicatos but not yet for the price , maybe because of the changes they're making in their site, example you can try : `pandas_datareader.DataReader('GDP', 'fred', start='1986-01-02', end='2021-06-30')` – Ran A Jun 20 '22 at 15:50
  • Yes, you are right. when I replace 'USD1MTD156N' by 'GDP' it works. – Gilles Criton Jun 20 '22 at 15:58

1 Answers1

0

I believe for your specifc data : 'ICE Benchmark Administration Limited (IBA), 1-Month London Interbank Offered Rate (LIBOR), based on U.S. Dollar [USD1MTD156N],'

It's been removed from FRED : check the link below , it has the data that are no longer available , https://news.research.stlouisfed.org/2022/01/ice-benchmark-administration-ltd-iba-data-to-be-removed-from-fred/

other than that you're good to go, you can use :

    pandas_datareader.DataReader('GDP', 'fred', start='1986-01-02', end='2021- 
    06-30') 
Ran A
  • 746
  • 3
  • 7
  • 19