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.
Upgrade from Eikon -> Workspace. Learn about programming differences.
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.
Hi,
Thank you for your participation in the forum.
Is the reply below satisfactory in answering your question?
If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.
Otherwise please post again offering further insight into your question.
Thanks,
AHS
Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
AHS
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: