print the percentage of missing values in the embark town column, we will see 0. So, the output of the above program will be:
0.22446689113355783 0.0
Here, we are also plotting a bar chart that shows how many passengers embarked from each embark town. After the missing category imputation, the bar chart will have a bar called โMissing.โ

Please note that df.embark_town.value_counts() returns a series. The indexes of the series are the unique embark towns. And the values of the series are the number of passengers from each of those embark towns. The bar chart clearly shows that after the missing category imputation, some values of the column are โMissing.โ








































0 Comments