dataframe function to match its index with values of list code example Example: dataframe function to match its index with values of list df[col] = df[col].apply(clean_alt_list)