Deal with Missing Value
Let's see how to deal with a missing value.
We'll cover the following...
The missing values problem is very common in the real world. For example, suppose you are trying to collect information from a company. There is a field for a company address. Many people want to keep their privacy and leave this field empty. If the data is loaded by pandas, those empty fields are listed as missing values. NaN
is the default missing value in pandas.
Operations on NaN
data
- When
mean
/sum
/std
/median
are performed on a Series which contains missing values, these values would be treated as zero. - When
add
/div
/sub
are performed, the result isNaN
. - If all