Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

median is a method, not an attribute.

You need to call it with ():

df["LiteracyRate"] = df["LiteracyRate"].replace(np.NaN, df["LiteracyRate"].median())
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading