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
1 2 3 6

First time user here - Translating from Excel to Python

Hi,

I am trying to translate the following function:
=@TR( 'BNPP.PA' ,"TR.ROATotalAssetsPercent","SDate=#1 CH=Fd",,2021-04-21)


My implementation doesnt work:

fields = ['TR.ROATotalAssetsPercent', 'TR.ROAActValue']

parameters = { 'SDate' : '#1', 'EDate' : '2021-04-21', 'CH' : 'Fd' }

ticker = 'BNPP.PA'

data_grid, err = ek.get_data(ticker, fields = fields, parameters = parameters)

Could anyone provide insights? Thank you.

eikoneikon-data-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-apiexcel
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
Upvote
Accepted
21.8k 57 14 21

Try something like this -

df, err = ek.get_data( 'BNPP.PA', ['TR.ROATotalAssetsPercent', 'TR.ROAActValue'], {'SDate': '2021-04-21', 'EDate':'2021-04-30', 'FRQ': 'D'})


1621521787221.png (17.5 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.