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