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
20 1 0 3

Headers & date fields

I am trying to replicate this Excel function with the python API

=TR("FB.O";"TR.TotalRevenue";"Period=FQ0 Frq=FQ SDate=0 EDate=-4 RH=date")

I would like to have the same date associated with RH. I guess I would need an extra field, but I can't figure out which one or how to set get_data

ek.get_data(['FB.O'], ["TR.TotalRevenue"], parameters={"SDate": "0", "EDate": "-4", "Period": "FQ0", "Frq": "FQ"})

Output in Excel:

2018-09-30 1,37E+10 2018-06-30 1,32E+10 2018-03-31 1,2E+10 2017-12-31 1,3E+10 2017-09-30 1,03E+10

Thanks

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
39.4k 77 11 27

Add TR.TotalRevenue.date to the list of fields:

ek.get_data(['FB.O'], ["TR.TotalRevenue.date","TR.TotalRevenue"], {"SDate": "0", "EDate": "-4", "Period": "FQ0", "Frq": "FQ"})
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.

So it's TR.Fields.Output

thanks!

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.