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
22 5 3 7

how download a data into csv file

Hello Guys, i´m trying to download a data with get_timeseries and when i get it i have a problem with my csv file.

I currently use:

import eikon as ek

ek.set_app_id('XXXXXXXXXXXXXXXXXXX')

df=ek.get_timeseries(['CARC.BA','CEL.BA','CAMb.BA','COL.BA','DYC.BA','ESM.BA','FER.BA','FIP.BA','GAR.BA', 'GBA.BA','CLA.BA','GRM.BA','CEC.BA','INR.BA','IRCP.BA','IRCP.BA','LON.BA','.MERV', '.MAR','.MER25','ARBPLD3=BA','ARCUAP3=BA','ARDICA3=BA','ARDICP3=BA','ARDICY3=BA', 'ARNO203=BA','ARPARA3=BA','ARPARY3=BA','ARPR133=BA','ARTVPA3=BA','ARTVPP3=BA', 'ARTVPY3=BA','ARBP283=BA','ARBPMD3=BA','ARPARP3=BA','ARBARX13=BA','ARBPLE3=BA'], interval="daily", fields=['date','open','high','low','close'], start_date='2000-01-01' , end_date='2008-01-01')

df.to_csv('ALFIN1.csv')

and then my data come

i have a problem with my date... run like the year is the day

2001-11-29

2002-02-27

2003-08-25

.........

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apidatacsv
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.

Upvote
Accepted
4.3k 2 4 5

your request causes too large result (too many instruments and too large range of date), then you meet the limit of 3000 datapoints. That's why a lot data has NaN value.

Note that 'date' field doesn't exists for timeseries, right name is 'timestamp' that is included by default in result.

If you reduce the number of instrument and the range of date, the result makes sense:

>>> df2=ek.get_timeseries(['CARC.BA','CEL.BA'], interval="daily", fields=['open','high','low','close'], start_date='2000-01-01' , end_date='2002-01-01')
>>> df2.head()
Security     CARC.BA                                  CEL.BA            \
Field           OPEN      HIGH       LOW     CLOSE      OPEN      HIGH
Date
2000-01-03  0.250202  0.250202  0.240194  0.240194  0.331061  0.331061
2000-01-04  0.225182  0.235190  0.225182  0.235190       NaN       NaN
2000-01-05  0.225182  0.225182  0.225182  0.225182  0.308489  0.308489
2000-01-06  0.220178  0.225182  0.220178  0.225182       NaN       NaN
2000-01-07  0.225182  0.225182  0.225182  0.225182       NaN       NaN

Security
Field            LOW     CLOSE
Date
2000-01-03  0.331061  0.331061
2000-01-04       NaN       NaN
2000-01-05  0.308489  0.308489
2000-01-06       NaN       NaN
2000-01-07       NaN       NaN
>>>
 
              
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.

Thanks so mouch

Upvotes
22 5 3 7

Otherwise, within my RIC´S list 'AGR.BA','ALU.BA','APBR.BA','AUS.BA','BHI.BA'

,'BMA.BA','BOL.BA','BYMA.BA','cec.ba','CEPU.BA','COM.BA','CRE.BA','CON.BA','ECO.BA','EDN.BA','SID.BA',

'FRA.BA','GFG.BA','HARG.BA','MIR.BA','OEST.BA','PAM.BA','PGR.BA','SMI.BA','SUPV.BA','TEC2.BA','TGNC.BA',

'TGS2.BA','TRA.BA','TENA.BA','YPFD.BA','BPAT.BA','RIO.BA','CAO.BA','CAU.BA','CARC.BA','CEL.BA','CAMb.BA','COL.BA',

'CTGM.BA','CVH.BA','DYC.BA','EDLH.BA','EMDH.BA','ESM.BA','FER.BA','FIP.BA','GAR.BA','GBA.BA','CLA.BA','GRM.BA','HAVH.BA',

'CEC.BA','INR.BA','INVJ.BA','IRCP.BA','IRCP.BA','LEDh.BA','LOMA.BA','LON.BA','metr.BA','.MERV','.MAR','.MER25','ARA2E23=BA',

'ARA2E2D3=BA','ARA2E73=BA','ARA2E7D3=BA','ARA2E83=BA','ARA2E8D3=BA','ARA2M23=BA','ARAA21D3=BA','ARAA22X3=BA',

'ARAA22Z3=BA','ARAA253=BA','ARAA25D3=BA','ARAA263=BA','ARAA373=BA','ARAA37D3=BA','ARAA46D3=BA','ARAC173=BA',

'ARAC17D3=BA','ARAE483=BA','ARAE48D3=BA','ARAF193=BA','ARAM203=BA','ARAMX93=BA','ARAN183=BA','ARAN18D3=BA',

'ARAO203=BA','ARAO20D3=BA','ARAY243=BA','ARAY24D3=BA','ARBCIUA3=BA','ARBD2C93=BA','ARBDC193=BA','ARBDC223=BA',

'ARBPLD3=BA','ARBPLDD3=BA','ARCEDI3=BA','ARCH24D3=BA','ARCO24D3=BA','ARCO263=BA','ARCO26D3=BA','ARCUAP3=BA',

'ARDIA03=BA','ARDICA3=BA','ARDICAD3=BA','ARDICP3=BA','ARDICPD3=BA','ARDICY3=BA','ARDICYD3=BA','ARDIY03=BA',

'ARNO203=BA','ARPAA03=BA','ARPAA0D3=BA','ARPAP03=BA','ARPARA3=BA','ARPARAD3=BA','ARPARY3=BA','ARPARYD3=BA',

'ARPAY03=BA','ARPB21D3=BA','ARPBF233=BA','ARPBM243=BA','ARPF23D3=BA','ARPMG183=BA','ARPMJ213=BA','ARPMN183=BA',

'ARPMO183=BA','ARPR133=BA','ARPR153=BA','ARPUM213=BA','ARPUO193=BA','ARRNG233=BA','ARSA24D3=BA','ARTC213=BA','ARTC233=BA',

'ARTJ203=BA','ARTO263=BA','ARTVPA3=BA','ARTVPAD3=BA','ARTVPE3=BA','ARTVPP3=BA','ARTVPY3=BA','ARTVPYD3=BA','ARPSUR3=BA',

'ARSTD3=BA','ARKO3=BA','ARLMT3=BA','ARA2E33=BA','ARA2E3D3=BA','ARAA223=BA','ARAA463=BA','ARBDC203=BA','ARBDC283=BA','ARBP283=BA',

'ARBPMD3=BA','ARCCO263=BA','ARDIA0D3=BA','ARPARP3=BA','ARPMD183=BA','ARRI25D3=BA','ARTC203=BA','ARTFU273=BA','ARTS183=BA',

'ARINAG3=BA','ARBRIO63=BA','ARDOME3=BA','AREDSH3=BA','ARMTBA3=BA','ARMSFT3=BA','ARAA193=BA','ARAA19D3=BA','ARAA213=BA',

'ARBARX13=BA','ARBDC243=BA','ARBOC6O3=BA','ARBP18D3=BA','ARBP213=BA','ARBP28D3=BA','ARBPLE3=BA','ARBPLED3=BA','ARDICE3=BA',

'ARDIP03=BA','ARNDG213=BA','ARPAY0D3=BA','ARPB24D3=BA','ARPB27D3=BA','ARPBY223=BA','ARPMY243=BA','ARS24DD3=BA','ARTO213=BA',

'ARTU27D3=BA','ARTVY03=BA','ARABT3=BA','ARHMY3=BA','ARMON3=BA','ARPFE3=BA','ARQCOM3=BA','ARXOM3=BA','ARA2M2Z3=BA','ARAA26D3=BA',

'ARERF253=BA','ARPARE3=BA','ARPBD193=BA','ARPBJ273=BA','ARABX3=BA','ARBSBR3=BA','ARCAT3=BA','ARPU23D3=BA','ARTXAR3=BA','ARBA.C3=BA',

'ARJPM3=BA','ARRIO3=BA','ARCHSG13=BA','ARLEID3=BA','ARDIY0D3=BA','ARMERA3=BA','ARHULI3=BA','ARIBM3=BA','ARRNG223=BA','ARSLB3=BA',

'ARPBA253=BA','ARPBJ9D3=BA','ARPU26D3=BA','ARRIF253=BA','ARTO233=BA'

AT LEAST THE 70% OF THEM HAVE AN ERROR LIKE

INVALID RIC

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.

@pablo
Did you mean to ask a question here? If yes, I'm not sure what you're asking. A bunch of RICs on your list are indeed invalid, e.g. SID.BA, EMDH.BA, ARAA22X3=BA, ARAA22Z3=BA etc. If you meant to ask something, would you mind elaborating on your question?

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.