For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
20 0 0 2

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
39.2k 75 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 5.0 MiB each and 10.0 MiB total.

So it's TR.Fields.Output

thanks!

Click below to post an Idea Post Idea