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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Why does eikon.get_timeseries not return a timestamp?

Hi,


Here is a snippet of my code.


df = eikon.get_timeseries(['AUD='],start_date='2000-12-31',end_date='2020-4-18',interval='daily',fields=['TIMESTAMP', 'VALUE', 'VOLUME', 'HIGH', 'LOW', 'OPEN', 'CLOSE'])

df.to_csv (r'D:\Data Science\export_dataframe.csv', index = False, header=True)

print(df['TIMESTAMP'])

print(df)


I am not able to retrieve a TIMESTAMP column.

File "C:/Users/Alex/.spyder-py3/sqllitedbtable.py", line 21, in <module>

print(df['TIMESTAMP'])

Could you kindly assist?

Alex


eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythontime-seriestime-stamp
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

Upvotes
Accepted
6.7k 8 6 7

@alexkohhj Hi thanks for your question. The reason for this is that the timestamp field (or datetime) is automatically returned as the index - not a regular column per se. Why don't you try:

print(df.index)

or

print(df.index.values)

Also I note in your export to csv file you have a parameter index=false - I think this should be true. I hope this can help.

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