I have a data set in which there is a column known as Native Country which contain around 30000 records. Some are missing represented by NaN so I thoug
30000
NaN
You can get the number 'mode' or any another strategy
num = data['Native Country'].mode() data['Native Country'].fillna(num, inplace=True)
or in one line like this
data['Native Country'].fillna(data['Native Country'].mode()[0], inplace=True)