Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by pablo · May 28, 2018 at 11:52 AM · apieikon apipython apidataroomdataapi

Get an clean data from Api in python

Hi, I'm introducing the following code to get the data via api. There are many row that are empty. There will be some code that I can put so that the empty data is put by N.A and separated by ","

ek.get_timeseries(['AGR.BA','ALU.BA','APBR.BA','AUS.BA','HI.BA','MA.BA','BPAT.BA','BYMA.BA', 'CAMb.BA','CAO.BA','CARC.BA','CAU.BA','CEC.BA','CEL.BA','CEPU.BA','CLA.BA', 'COL.BA','COM.BA','CON.BA','CPS.BA','CRE.BA','CVH.BA','DOM.BA','DYC.BA', 'ECO.BA','EDLH.BA','EDN.BA','EDSH.BA','EMD.BA','ESM.BA','FER.BA','FIP.BA', 'FRA.BA','GAR.BA','GBA.BA','GFG.BA','GRM.BA','HARG.BA','HAVH.BA','INA.BA', 'INR.BA','INU.BA','INVJ.BA','IRCP.BA','IRS.BA','LED.BA','LOMA.BA','LON.BA', 'MERA.BA','MET.BA','MIR.BA','MOL.BA','MOLA.BA','MOR.BA','OEST.BA','PAM.BA', 'PAT.BA','PETR.BA','PGR.BA','POL.BA','PSU.BA','QUI.BA','REP.BA','RICH.BA', 'RIG.BA','RIO.BA','ROS.BA','SEI.BA','SMI.BA','STD.BA','SUPV.BA','TEC2.BA', 'TEF.BA','TENA.BA','TGLT.BA','TGNC.BA','TGS2.BA','TRA.BA','TXAR.BA','VAL.BA', 'YPFD.BA','YPFD.BA'], start_date='2000-01-01' , end_date='2018-01-01')

df.to_csv('galicia_2016_20128.csv')

vanphamnhatlan93

People who like this

1 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by nick.zincone.1 · May 28, 2018 at 02:45 PM

Hi @pablo,

If I understand you correctly, you would like to replace the empty data that appears in you file with some value like "NA"? If so, try this:

df = df.fillna('NA')
df.to_csv('galicia_2016_20128.csv')
Comment
pablo
Zhenya Kovalyov

People who like this

2 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Filter price by certain criteria

how download a data into csv file

ERROR in Data

How can I download historical Brent and WTI contract.

Missing fundamentals data via Python API

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges