Actually I want to replace the prefix with the mean here. How can i acheive it. When replacing it it is replacing with NaN but not with the mean values.
This is my code:
Since the second column is a multi-index column, you are basically trying to set a single column as a dataframe. You will have to refer to the exact column name to do that replacement.
z['ID']=z['teacher_number_of_previously_posted_projects']['mean']