Is it possible to use cell referencing on Python / codebook?

Options

hello,

Is it possible to use cell referencing using Python / Codebook?

Please see attached Excel file for reference

In addition, how can we display the dates? In added the parameter 'RH': 'Date' but still did not display the dates

import refinitiv.data as rd
rd.open_session()
df = rd.get_data(
universe = ['AAPL.O'],
fields = ['PERCENT_CHG(TR.NetprofitSmartEst,wsize=-1)'],
parameters = {
'SDate': '2025-04-25',
'EDate': '2025-05-25',
'Frq': 'D',
'RH' : 'DATE'
}
)

display(df)

Thanks

Answers

  • Hello @JeffreyPatrick.Pinpin

    Cell referencing can be used within Excel formulas. Codebook is a hosted Jupyter environment and does not have a concept of cells.

    To show dates in your formula, use the .date output type for the field as shown:

    df = ld.get_data('AAPL.O', fields = ['TR.NetprofitSmartEst', 'TR.NetprofitSmartEst.date', 'PERCENT_CHG(TR.NetprofitSmartEst,wsize=-1)'],
      parameters = {
        'SDate': '2025-04-25',
        'EDate': '2025-05-25',
        'Frq': 'D',
      }
    )