Data Item returning NaN.

Hello, I am using the python eikon API, and the Data Item browser to get the code to do my queries, although when requesting the following TR I am getting NaN as a return, which is weird because I can see the value on the Data Item Browser but when making the request from python I get NaN.

Example of my code (all the values returned here are NaN):

debt_cy_minus1 = "TR.TotalDebtOutstanding(Period=FY-1,Curn=GBP)"
debt_cy = "TR.TotalDebtOutstanding(Period=FY0,Curn=GBP)"
cash_cy_minus1 = "TR.CashAndSTInvestments(Period=FY-1,Curn=GBP)"
cash_cy = "TR.CashAndSTInvestments(Period=FY0,Curn=GBP)"
enterprise_value_cy1 = "TR.EVMean(Period=FY1,Curn=GBP)"
revenue_cy_minus1 = "TR.Revenue(Period=FY-1,Curn=GBP)"
ebitda_cy_minus1 = "TR.EBITDA(Period=FY-1,Curn=GBP)"

queries = [debt_cy_minus1, debt_cy, cash_cy_minus1, cash_cy, enterprise_value_cy1, revenue_cy_minus1, ebitda_cy_minus1]

market = ek.get_data("LLOY.L", queries, {"SDate": '20180831', "EDate": '20180831'})

Best Answer

  • Please remove {"SDate": '20180831', "EDate": '20180831'} from the query.

    ...
    market = ek.get_data("LLOY.L", queries, {})

    The result is:

    image