How to replace one column values with another column values

Question:

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:

My code

Asked By: Om Kumar

||

Answers:

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']
Answered By: Akshay Sehgal
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.