i need to perform data preprocessing wherein i should fill up the missing values by mean value. for (eg)
patientid age exang
1 35 1
2 - 1
3 40 -
here age of patient 2 is missing. i need to fill it by suming up the age of all three patients and divide by 3 (ie) by mean value. similarly for exang attribute. can anyone help me with a code ? Thank you.