Hello,
The below formulas on excel give me the split of sales by country for a chosen company that has published financials. I would like to do that for a list of companies, via the Python API.
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Hello,
The below formulas on excel give me the split of sales by country for a chosen company that has published financials. I would like to do that for a list of companies, via the Python API.
The code should like this:
df,err = ek.get_data(["PEP.O","IBM.N"],
[
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY0).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY0).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY0)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-1).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-1).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-1)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-2).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-2).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-2)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-3).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-3).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-3)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-4).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-4).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-4)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-5).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-5).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-5)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-6).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-6).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-6)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-7).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-7).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-7)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-8).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-8).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-8)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-9).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-9).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-9)",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-10).segmentName",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-10).periodEndDate",
"TR.BGS.GeoExternalRevenue(Scale=6,Period=FY-10)"
]
)
df
The output is: