Home > Net >  <bound method NDFrame._add_numeric_operations.... HELP! **Replacing Missing Values with the Media
<bound method NDFrame._add_numeric_operations.... HELP! **Replacing Missing Values with the Media

Time:01-24

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

CodePudding user response:

median is a method, not an attribute.

You need to call it with ():

df["LiteracyRate"] = df["LiteracyRate"].replace(np.NaN, df["LiteracyRate"].median())
  • Related