I'm curious if it's possible to use
rdp.get_data functions in a way that returns data items based on the specified fields query (ie starting with 'TR.'), rather than using the default column names.
To provide a concrete example, let's say I have a fields query like this:
df, err = ek.get_data( instruments = ['AAPL.O'], fields = [ 'TR.ISIN', 'TR.PriceClose', 'TR.PriceClose.date', 'TR.EnvironmentPillarScore', "TR.AnalyticRenewEnergyUse", "TR.PercentageGreenProducts", "TR.BlackorAfricanAmerican-MinoritiesEmployeesPercentage", "TR.HispanicorLatino-MinoritiesEmployeesPercentage", "TR.OtherMinoritiesEmployeesPercentage"] )
I would like to have the variables as they appear in fields, instead of these column names.
df.columns Index(['Instrument', 'ISIN', 'Price Close', 'Date', 'Environmental Pillar Score', 'Renewable Energy Use Ratio', 'Percentage of Green Products', 'Other - Ethnic Minorities Employees Percentage'], dtype='object')
The central issue revolves around certain variables not being retrieved as expected. Consequently, the approach of renaming df.columns using the fields list is not a feasible solution.
Is there a method or option that allows me to obtain the data in this format? Your insights would be greatly appreciated. Thank you!