Why is mapping dataseries with dataframe column names taking so long with map function

Hi all i have a dataframe of approx 400k rows with a column of interest. I would like to map each element in the column to a category (LU, HU, etc.). This is obtained from a smaller dataframe where the column names are the category. The function below however runs very slow voor only 400k rows. I m not sure why. In the example below ofcourse it is fast for 5 examples.

cwp_sector_mapping = {
'LU': ['C2P34', 'C2P35', 'C2P36'],
'HU': ['C2P37', 'C2P38', 'C2P39'],
'EH': ['C2P40', 'C2P41', 'C2P42'],
'EL': ['C2P43', 'C2P44', 'C2P45'],

'WL': ['C2P12', 'C2P13', 'C2P14'],
'WH': ['C2P15', 'C2P16', 'C2P17'],
'NL': ['C2P18', 'C2P19', 'C2P20'],


}
df_cwp = pd.DataFrame.from_dict(cwp_sector_mapping)
columns = df_cwp.columns
ls = pd.Series(['C2P44', 'C2P43', 'C2P12',  'C2P1'])
temp = list((map(lambda pos: columns[df_cwp.eq(pos).any()][0] if 
             columns[df_cwp.eq(pos).any()].size != 0 else 'UN', ls)))

Use next with iter trick for possible get first meached value of columns, if no match get default value UN:

temp = [next(iter(columns[df_cwp.eq(pos).any()]), 'UN') for pos in ls]