Missing Values
This lesson will elaborate on how to deal with data that has missing values.
Missing values
During data collection and entry, it is possible that some values are missed, or data was not available for some entries. Hence, missing data is very common among data science applications.
Pandas makes it very easy to work with missing data. It does not include missing values in all of its different calculations such as sum, mean, etc. by default.
Pandas writes the value NaN
(Not a Number) when it finds a missing value.
Detecting missing values
We can detect missing values using the function isnull
. It returns True
wherever there is a missing value, and False
, otherwise.
Get hands-on with 1400+ tech skills courses.