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
13 1 1 2

ek.get_timeseries doesn't return a classical dataframe

Hi, I am using the eikon API for python. When I write the following script:

##########################################

import eikon as ek TASA_BANREP = ek.get_timeseries(['aCOCBR'], start_date=start_date, end_date=end_date, interval='monthly')

df_TASA_BANREP = pd.DataFrame(TASA_BANREP['VALUE']) df_TASA_BANREP['VALUE'] ##########################################


I don't get a single field for Value, but instead get a date and the value.

Date

2001-01-31 12.0

2001-02-28 12.0

2001-03-31 11.5

2001-04-30 11.5

2001-05-31 11.5 ...

2022-10-31 11.0

2022-12-31 12.0

2023-01-31 12.75

2023-03-31 13.0

2023-05-31 13.25

Name: VALUE, Length: 208, dtype: Float64


Could you tell me how can I get a traditional dataframe as it works with the command ek.get_data Thanks!

eikon-data-apipython#technology
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.

1 Answer

· Write an Answer
Upvotes
Accepted
79.8k 257 52 74

@Andresgo

Thank you for reaching out to us.

Please try this code:

pd.DataFrame(TASA_BANREP.reset_index()["VALUE"])

The output is:

1690778914168.png



1690778914168.png (10.4 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.

Perfect, thanks

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.