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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 0 1 4

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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvote
Accepted
6.7k 8 6 7

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea