Script: from refinitiv.data.content import search import refinitiv.data as rd import pandas as pd from datetime import date, timedelta, datetime import numpy as np rd.open_session() response = search.Definition(view=search.Views.FIXED_INCOME_INSTRUMENTS, \ filter = f"MaturityRedemDate ge {datetime.today().strftime('%Y-%m-%d')} and IsActive eq true and (InstrumentTypeDescription eq 'Bond' or InstrumentTypeDescription eq 'Note') "\ "and PrincipalCurrency eq 'GBP' "\ "and InflationProtected eq 'N' "\ "and IndustrySectorDescription ne 'Other Financial' and IndustrySectorDescription ne 'Sovereign' and IndustrySectorDescription ne 'Official and Muni' and IndustrySectorDescription ne 'Supranational' "\ "and IndustrySectorDescription ne 'Banks' and IndustrySectorDescription ne 'Agency' and IndustrySectorDescription ne 'Official and Muni'", \ navigators = "SectorDescription", \ select="IssuerLegalName, RIC, ISIN, IsActive, IssueDate, MaturityRedemDate, MaturityYearsToRedem, IssuerCountry, "\ "PrincipalCurrency, InflationProtected, SearchAllCategoryv3, InstrumentTypeDescription, DebtTypeDescription, AssetType, AssetCategory, AssetTypeDescription, AssetSubTypeDescription, AssetStateName," \ "MoodysRating, MoodysRatingDate, SPBondRatingLatest, SPRating, SPRatingDate, "\ "MaturityDate, RCSOrganisationTypeName, IndustrySectorDescription, DbSubTypeDescription, Sector, SectorDescription,"\ "DocumentTitle, Description", \ top = 10000).get_data() df = response.data.df df1 = rd.get_data( #universe=[df["RIC"][1:10000]], universe= df["Instrument"][0:].astype(str).to_list(), #fields=['TR.GR.Rating(BondRatingSrc=FTC:S&P:MDY).RatingSourceDescription','TR.GR.Rating(BondRatingSrc=FTC:S&P:MDY)','TR.GR.Rating(BondRatingSrc=FTC:S&P:MDY).date'] fields=['TR.GR.Rating.RatingSourceDescription','TR.GR.Rating','TR.GR.Rating.date'] ) display(df1) --------------------------------------------------------------------------- KeyError Traceback (most recent call last) /opt/conda/lib/python3.8/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance) 3360 try: -> 3361 return self._engine.get_loc(casted_key) 3362 except KeyError as err: /opt/conda/lib/python3.8/site-packages/pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc() /opt/conda/lib/python3.8/site-packages/pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() KeyError: 'Instrument' The above exception was the direct cause of the following exception: KeyError Traceback (most recent call last) /tmp/ipykernel_131/3522245218.py in 25 df1 = rd.get_data( 26 #universe=[df["RIC"][1:10000]], ---> 27 universe= df["Instrument"][0:].astype(str).to_list(), 28 #fields=['TR.GR.Rating(BondRatingSrc=FTC:S&P:MDY).RatingSourceDescription','TR.GR.Rating(BondRatingSrc=FTC:S&P:MDY)','TR.GR.Rating(BondRatingSrc=FTC:S&P:MDY).date'] 29 fields=['TR.GR.Rating.RatingSourceDescription','TR.GR.Rating','TR.GR.Rating.date'] /opt/conda/lib/python3.8/site-packages/pandas/core/frame.py in __getitem__(self, key) 3456 if self.columns.nlevels > 1: 3457 return self._getitem_multilevel(key) -> 3458 indexer = self.columns.get_loc(key) 3459 if is_integer(indexer): 3460 indexer = [indexer] /opt/conda/lib/python3.8/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance) 3361 return self._engine.get_loc(casted_key) 3362 except KeyError as err: -> 3363 raise KeyError(key) from err 3364 3365 if is_scalar(key) and isna(key) and not self.hasnans: KeyError: 'Instrument'