Trying to convert an Excel search line to python

Hello all, i am trying to convert this excel field into a python line, is there any easy way of doing it, i did go through the api documentation and could not find a suitable answer or call for it.

TR(RSearch("ECONOMIC",A6:B6,"NBROWS:2000",,),"ECI_ACT_DT; ACT_VAL_NS; TR.IndicatorType; CTB_LOC1; DSPLY_NME2; FCAST_PRD; RPT_UNITS; ECON_ACT; RTR_POLL; FCAST_ACRY; ECON_PRIOR; TR.IndicatorSource; TR.IndicatorPeriodicity; TR.InstrumentDescription","UPDFRQ=SNAP START=2018-08-24 END=2018-09-30 CH=Fd RH=IN",C3)

Thank you in advance.

Best Answer

  • @JCrystal I am afraid that is not possible, as there is not equivalent to the RSearch in python. Not too sure what the Start/End params refer to though. Anyway if you have the list of indicators, it would look something like this:

    fields = ['ECI_ACT_DT', 'ACT_VAL_NS', 'TR.IndicatorType', 'CTB_LOC1',
    'DSPLY_NME2', 'FCAST_PRD', 'RPT_UNITS', 'ECON_ACT', 'RTR_POLL', 'FCAST_ACRY', 'ECON_PRIOR','TR.IndicatorSource',
    'TR.IndicatorPeriodicity','TR.InstrumentDescription']

    df, e = tr.get_data(['CARSLS=ECI','USMPMP=ECI'], fields=fields, parameters={'SDate':'2018-08-24', 'EDate':'2018-09-30'})

    image

Answers

  • Yes it did. The Start and End was an attempt to control the data on the in munch the same way the EE page does. Thank U