how do i make a function like this to work?
import refinitiv.data as rd
rd.open_session()
year = [2025,2026]
df = rd.get_data(
universe = ['CEAB3.SA'],
fields = ['TR.NetProfitMean(Period=year1})',
'TR.NetProfitMean(Period=year2})'],
parameters = {
'year1':year[0],
'year2':year[1]
}
)
display(df)
the year list is dynamic. So i want the Period=year[i] to also be dynamic
I want to set the Period=FY2025 as Period=X, with X being dynamic.