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

How to convert Excel formula to Python API request?

Hi

I looked through the manuals, this community, and contacted support, which directed me back here. I have struggle generating the same output from the following Excel request in Python:

=@RDP.Data("LP68192766";"TR.FundTER";"SDate=1990-01-01 EDate=2020-12-31 CH=Fd RH=date";G2)

In Excel, I get something like this:

31.12.2012 0.85

31.12.2013 0.85

31.12.2014 0.85

In Python, I use the following code as adding the Excel parameters apparently does not work:

df, err = ek.get_data(['LP68192766'], ['TR.FundTER'],{'SDate':'1990-01-01', 'EDate':'2020-12-31'})

The output I get is as follows:

0 LP68192766 0.85
1 LP68192766 0.85
2 LP68192766 0.85

I would like to also have the dates of the data points delivered as in Excel. Any help would very much be appreciated.

eikoneikon-data-apirefinitiv-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
10.2k 18 6 9

@ErikM Pls try the following:

df, err = ek.get_data(['LP68192766'], ['TR.FundTER.date','TR.FundTER'],{'SDate':'1990-01-01', 'EDate':'2020-12-31'})

df

1626164870993.png

I hope this can help.


1626164870993.png (98.1 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.