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
166 13 18 21

Eikon API: how to add dates to output of 'get_data'?

Question on behalf of a client: how to add the dates (as index) to the output of the following code?

start_date = str(20170801)
end_date = str(20170901)

data, err = eikon.get_data("ACCG.AS", ["TR.PriceTargetMean", "TR.PEG"], parameters= {"SDate":start_date, "EDate":end_date})

Thank you so much in advance for your help!

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.

Upvote
Accepted
39.4k 77 11 27

You can add date output to either one or both of these fields by adding the field with .date qualifier. E.g. eikon.get_data("ACCG.AS", ["TR.PriceTargetMean.date", "TR.PriceTargetMean", "TR.PEG"], {"SDate":start_date, "EDate":end_date})

Note that if there's a possibility that the dates for TR.PriceTargetMean and TR.PEG do not align due to gaps in data or some such, you need to request dates for these two fields separately: eikon.get_data("ACCG.AS", ["TR.PriceTargetMean.date", "TR.PriceTargetMean", "TR.PEG.date", "TR.PEG"], {"SDate":start_date, "EDate":end_date})
We're working on an enhancement to introduce master date output column similar to what RH:Date parameter does for =TR function in Eikon Excel.

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.

Upvote
43 5 2 7

@Alex Putkov Thank you for your reply and good to know you are working on an enhancement similar to RH:Date for excel.

The issue with adding "TR.PriceTargetMean.date" is that it only adds the latest known date of a price target update and not the specific dates in between, so using this function still does not solve my issue of finding the price target for all dates between start_date and end_date.

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.

Upvotes
39.4k 77 11 27

Try TR.PriceTargetMean.calcdate instead then.

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.

Upvotes
43 5 2 7

Great! That's exactly what I needed!

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.

Upvotes
1 0 0 0

Dear Alex Putkov,

you mentioned "We're working on an enhancement to introduce master date output column similar to what RH:Date parameter does for =TR function in Eikon Excel".

Do you have any update on this? This functionality would be very useful.

Thank you,

Bettina

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.

Upvotes
14.3k 30 5 10

hi @Bettina.DeRuyck ,

Currently, you can use Data Item Browser (DIB) in Refinitiv Workspace/Eikon desktop app to get the available date parameter of each field

To access DIB, type DIB in the Eikon search bar. Then you can search for the field name, its description, and available parameters are shown at the right section of the app. Please see an example screenshot below

1646882962336.png

Here's the Data Item Browser training video

However, as far as I know, the master date output column similar to what RH:Date parameter does for =TR function in Eikon Excel isn't available yet. and DIB only provides the date of each field.

Hope this could help

Plus, please be informed that the closed thread (question with an accepted answer) won't be monitored, so in case you'd like to raise a question, please create a new question and you may mention the reference question in the post as well.


1646882962336.png (68.2 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.