How can one define empty (NULL) fields in a Python request for Refinitiv Data Library?

The Python command


df=rd.get_data('AAPL.OQ', ['TR.ISINCode', , , 'TR.InstrumentType'])


returns a syntax error.

What I would like to do is for formatting purposes to have some empty (NULL) fields between the fields TR.ISINCode and TR.InstrumentType. How can empty fields be specified?

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hi @IoannisG,

    Its always a good idea to separate the data from display. You cannot add null fields into the request and it is not a good idea anyways. Formatting the displayed data should be done with dataframe. Pandas has couple of options for column width settings which you can utilize.

    You can even iterate over the dataframe and write your own data render routines, in the manner that you prefer.

Answers