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

question

Upvotes
Accepted
55 6 8 8

Load sales geographical split for a list of companies

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.

10873-image.png

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
image.png (42.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@emmanuel.chaslin

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

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@emmanuel.chaslin

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:

10874-image.png


image.png (87.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.