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

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-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.

Upvotes
Accepted
18.2k 21 13 21

Hi @Yufeng.Ling1

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 512.0 KiB each and 1.0 MiB total.

Upvotes
166 2 1 3

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 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.