I have the following list:
index_list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
I would like to use it to define an index for the following DataFrame:
df = pd.DataFrame(index= [0,1,4,7])
The DataFrames index corresponds to an entry in the list. The end result should look like:
df_target = pd.DataFrame(index= ['a','b','e','h'])
I have tried a number of built in functions for pandas, but no luck.