I can aggregate country market capitalization in Excel with:
=TRAggregate("SCREEN(U(IN(EQUITY(Public,Active,Primary))),TR.CompanyMarketCap(CURN=USD)>=50000000)","TR.CompanyMarketCap(Curn=USD)","TR.HQCountryCode")
How do I get this through the Eikon Python API? Here's my best guess, but it is not working:
df, err = ek.get_data("TRAggregate(SCREEN(U(IN(EQUITY(Public,Active,Primary))),TR.CompanyMarketCap(CURN=USD)>=50000000),TR.CompanyMarketCap(Curn=USD),TR.HQCountryCode)","na")
I could retrieve all the data, and aggregate in Python using "df, err = ek.get_data("SCREEN(U(IN(Equity( ..." , but that would be inefficient. Right?
Thanks,
Brent