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
1 0 1 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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apitime-seriestime-stamp
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 @alexkohhj

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

@alexkohhj

Hi,

Please let us know if you have any update on this question.

If it is still an issue, please post again to offer further insight into your question.

Regards,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
10.2k 18 6 9

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