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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 1

result format different with an additional parameter [0] at the end of ek.get_data()

I found that the result format is a little bit different with 2 of following expression

1. sse50=ek.get_data('0#.SSE50',['DSPLY_NMLL','TR.RIC','TR.PriceClose','TR.Volume','TR.TotalReturnYTD'])[0]

2. sse50=ek.get_data('0#.SSE50',['DSPLY_NMLL','TR.RIC','TR.PriceClose','TR.Volume','TR.TotalReturnYTD'])


the only difference is '[0]' at the end of the expression. What's the function of the additional parameter?

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.

Upvotes
Accepted
18k 21 12 20

Hi @Yufeng.Ling

Case1:

result1, result2 = ek.get_data(xxxxx)


Case2:

result = ek.get_data(xxxxx)


And reult[0] is the same as result1

reult[1] is the same as result2

result1 is the data

result2 is the error

https://docs-developers.refinitiv.com/1575385343207/14684/book/en/eikon/index.html#get_data


ahs0.png (9.7 KiB)
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.

Upvotes
1 1 0 1

Hi chavalit,


I got it. Thanks very much for your efficient reply.


Frank

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.

Click below to post an Idea Post Idea