• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Machine Learning by
How do you handle the missing or corrupted data in a dataset?

2 Answers

0 votes

In Python Pandas, there are two methods that are very useful. We can use these two methods to locate the lost or corrupted data and discard those values:

isNull(): For detecting the missing values, we can use the isNull() method.

dropna(): For removing the columns/rows with null values, we can use the dropna() method.

Also, we can use fillna() to fill the void values with a placeholder value.

0 votes
One of the easiest ways to handle missing or corrupted data is to drop those rows or columns or replace them entirely with some other value.

There are two useful methods in Pandas:

IsNull() and dropna() will help to find the columns/rows with missing data and drop them

Fillna() will replace the wrong values with a placeholder value


Related questions

0 votes
asked Nov 19, 2019 in Robotic Process Automation by rajeshsharma
+1 vote
0 votes
asked Jan 2, 2020 in Data Science by sharadyadav1986