...odebook?
Can I use Screener to get a data-frame of Revenue values for companies broken down by sector in Codebook? I tried in Excel and it crashes, presumebly because of the large size of the request.
Hi @danieluphromes ,
Yes, you can; please try the below in Codebook and let me know if it works as expected for you:
https://gist.github.com/johnukfr/834233fdd50e1c5c15d635ef034d7bc7
I tested it with
test1 = equityBySubSectorScreen( screenOn=[i.strip() for i in [' 5010101010', ' 5010101011', ' 5010101012', ' 5010201010', ' 5010202010', ' 5010202011', ' 5010202012', ' 5010202013', ' 5010202014', ' 5010202015', ' 5010203010', ' 5010203011', ' 5010203012', ' 5010203013', ' 5010301010', ' 5010301011', ' 5010301012']])test1
and
test2 = equityBySubSectorScreen( renameCols=False, screenOn=[i.strip() for i in [' 5010101010', ' 5010101011', ' 5010101012', ' 5010201010', ' 5010202010', ' 5010202011', ' 5010202012', ' 5010202013', ' 5010202014', ' 5010202015', ' 5010203010', ' 5010203011', ' 5010203012', ' 5010203013']])test2
Hi @cyril.blanchard ,
You can choose the fields you want out of the excel sheet with the argument `dataField`. The choice of fields you can request can be found using the DIB. I do this below to output 'equityBySubSectorScreenALL20230201v1.xlsx'
test4 = EquityBySubSectorScreen( dataField=["TR.TotalRevenue", "TR.NetDebt", "TR.EBITDA", "TR.CapitalExpenditures"], sectorFieldNames=[ "TR.TRBCEconomicSector", "TR.TRBCBusinessSector", "TR.TRBCIndustryGroup", "TR.TRBCIndustry", "TR.GICSIndustry", "TR.GICSIndustryGroup", "TR.TRBCActivity", "TR.TRBCActivityCode"])test1.to_excel("EquityBySubSectorScreenALLv1.xlsx")