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 /

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by smeetdev.vora · Jan 24 at 07:43 AM · eikon-data-apipythonpandas

Why do I get Pandas ValueError: invalid literal for int() with base 10: 'undefined' when I try to load a downloaded excel file from GOVSRCH into Python via read_excel?

Pandas Version: 1.1.5

People who like this

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by raksina.samasiri · Jan 24 at 11:11 AM

hi @smeetdev.vora

This error is not related to Eikon Data API, it's related to how Pandas library handle the input Excel file.

However, I spotted that the error is because the excel file contains the string '--' in column Coupon and when Pandas's read_excel function is executed, it's failed to convert the string into int hence the error is thrown.

1643019775806.png

According to this question on Stackoverflow, one of the ways to fix this is to convert the file from xlsx to csv, then use read_csv instead of read_excel to read the data

1643022633657.pngHope this could help


1643019775806.png (110.2 KiB)
1643022633657.png (187.1 KiB)
Comment
Shadab Hussain

People who like this

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

avatar image
REFINITIV
Answer by nick.zincone · Jan 24 at 03:04 PM

Hi @smeetdev.vora

An alternative way to pull down the contracts is to utilize the Search APIs directly as opposed to manually creating and exporting a spreadsheet and importing it into your application.

If this is of interest, you can review the source code for this debt structure analysis article and also look at a series of examples of how to use search.

Comment
raksina.samasiri
Shadab Hussain

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 >
12 People are following this question.

Related Questions

Python: Eikon is generating unrequested dates for some ID's, using get_data.

What other parameters can be used with the statement pertaining to Corporate Actions data such as Stock Splits?

Trying to retrieve Expired S&P500 Index option chain

FutureWarning for data_grid.py (pandas.np module is deprecated and will be removed... import numpy directly instead) when using Eikon Python API

How to rename the column header in the data frame?

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • FX Venues
    • FX Trading – RFQ Maker
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • Yield Book Analytics
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges