RHistory to Python ---- RIC DRYC-NTLKHH-COA

Hi,

I am trying to convert the following Excel formula to Python version.

Excel formula:

=RHistory("DRYC-NTLKHH-COA","NDA_RAW.Nda_date;NDA_RAW.Nda_last","START:01-Jan-2017 END:15-Feb-2018 INTERVAL:1D",,"CH:Fd",B2)

My Python code:

df = ek.get_timeseries( [ 'DRYC-NTLKHH-COA' ], fields='NDA_RAW.Nda_last', start_date = dt.datetime(2017, 1, 1, 0, 0, 0, 0 ), end_date = dt.datetime(2018, 2, 15, 0, 0, 0, 0 ), interval='daily', count = None, calendar = None, corax = None, normalize = False, raw_output = False, debug = False)

However, the code returns no value. Could you please help? Thanks very much.

Best Answer

  • Remove the fields parameter from your request. Try
    ek.get_timeseries( [ 'DRYC-NTLKHH-COA' ], start_date = dt.datetime(2017, 1, 1), end_date = dt.datetime(2018, 2, 15))

Answers