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
49 4 6 8

How could I adjust the code (Python Eikon data API) in order to have dates as well (not only data)?

df, err = ek.get_data(

instruments = ['PFE'],

fields = ['TR.TotalAssetsReported(Period=FY0,Frq=D,SDate=2018-01-01,EDate=2021-10-15,Scale=6)']

)


display(df)

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

Hello @susskaya.anita

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

@susskaya.anita

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
10.2k 18 6 9

@susskaya.anita just add a .date output type - the default is value:

df, err = ek.get_data(instruments = ['PFE'],fields =['TR.TotalAssetsReported(Period=FY0,Frq=D,SDate=2018-01-01,EDate=2021-10-15,Scale=6).date','TR.TotalAssetsReported(Period=FY0,Frq=D,SDate=2018-01-01,EDate=2021-10-15,Scale=6)'])


display(df)

1634314802931.png

I hope this can help.


1634314802931.png (120.0 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.