<bound method NDFrame._add_numeric_operations…. HELP! **Replacing Missing Values with the Median**

Question:

The column showed in the pictures below had missing values and I was trying to replace them with the median. I don’t know if it worked or not but it keeps on displaying <bound method NDFrame._add_numeric_operations I have no idea what this means and it can’t be good since it was suppose to show the median values in the place of missing values.

Pictures links:
bound method
bound method1

Asked By: liana raphs

||

Answers:

median is a method, not an attribute.

You need to call it with ():

df["LiteracyRate"] = df["LiteracyRate"].replace(np.NaN, df["LiteracyRate"].median())
Answered By: mozway