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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 2

Time Series retrieval using Python API shows NaN as result

I am using the eikon python api to extract some data.

I am doing the below:-
ek.get_timeseries(["912828N30="],
["TR.YieldToMaturityAnalytics"],
start_date="2018-10-09",
end_date="2018-10-10")
I get NaN for all the dates.

However, I can extract the same data via excel api as below:-
TR("912828N30","TR.YieldToMaturityAnalytics(ValuationDate=#1)",,E2,D2)
where D2 is set to the dates : 2018-10-09 and 2018-10-10

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

Upvote
Accepted
3.8k 4 4 6

Hi @John Altair.Bautista

To replicate Eikon Excel in Python API you need to use syntax below:

RICS = ['912828N30'] 
fields = ['TR.YieldToMaturityAnalytics(ValuationDate=2018-10-09)']
df,err = ek.get_data(RICS,fields)
df

It is not possible to retrieve timeseries for this data item in a single call in Eikon Excel. Please check the syntax as most probably cell E2 is the destination cell of the output.

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.

Thanks Marcin!

Click below to post an Idea Post Idea