How to translate Excel formula into python syntax?

I need to extract historcal ESG through Refinitiv Eikon Python.

i have the following Excel formula and need to translate it into python syntax, please!

=@RDP.Data("AAPL.O","TR.TRESGScore(RollPeriods=True IncludePartialYear=True)","Period=FY0 Frq=FY SDate=2019-01-01 EDate=2022-12-31 CH=Fd RH=IN;date",C3)



Best Answer

  • Jirapongse
    Answer ✓

    @RamadanEA

    Thank you for reaching out to us.

    Please try this one:

    df, err = ek.get_data(['AAPL.O'],
                         fields=['TR.TRESGScore(RollPeriods=True,IncludePartialYear=True)'],
                         parameters={
                             'Period':'FY0',
                             'SDate':'2019-01-01',
                             'EDate':'2022-12-31'
                                    }
                         )
    df

    The output is:

    1688694880856.png


Answers