How to make a list from the column headers?

Hi I am working on a project and would like to know if it's possible to extract the column headers, excluding the first cell, from rd.get_history result and put it inside a list. May I ask for guidance on how to do it?


As a sample, I am using this code



import refinitiv.data as rd

rd.open_session()

import pandas as pd

df = rd.get_history(universe = "LSEG.L", interval = "1D"))


df

image

I'd like to make a list from the boxed headers, the RIC <LSEG.L> is excluded.


Best Answer

Answers