Hello, I would like to screen for companies through a for loop. I would like to iterate on industry code, but I cannot get the iterators to work with the proper package syntax. Looking through the below code, can you tell me where I am going wrong? (Note, the need for the loop arises because my full search, and below is just a shortened sample, is hitting download limits, so I am trying to break it up.)
import eikon as rd import pandas as pd from datetime import date rd.set_app_key('8__________1') indcode = [52,53,54,57] syntax = f"SCREEN(U(IN(Equity(active,public,primary)))," \ "IN(TR.HQCountryCode,GB)," \ "IN(TR.TRBCEconSectorCode,{i}),CURN=USD)" CATfields = ["TR.CommonName", "TR.HeadquartersCountry"] df1 = [] for i in indcode: data1, err = rd.get_data(syntax, CATfields) df1.append(data1) df1 = pd.concat(data1) print(df1)