I want to append column headers of dataframe1 with various strings. I have another dataframe2 which contains column names and the strings to append.
How do i append column names in dataframe1?
dataframe1:
id C1_A C2_A C3_A C4_A C5_A
11 0 0 0 1 2
12 0 3 2 1 0
13 2 0 0 2 3
14 0 0 2 1 1
dataframe2
C S
C1_A HP
C2_A LP
C3_A KP
C4_A KP
C5_A HP
Desired output dataframe1
id HP_C1_A LP_C2_A KP_C3_A KP_C4_A HP_C5_A
11 0 0 0 1 2
12 0 3 2 1 0
13 2 0 0 2 3
14 0 0 2 1 1