Sadrach Pierre, Ph.D.
1 min readJun 6, 2020

--

Hi Rajesh, thank you for reading my article! There are 63 missing values for the ‘country’, which explains the mismatch. You can fix this by imputing the 63 missing country values. You can add the following before the function definition: df[‘country’].fillna(df[‘country’].mode()[0], inplace = True)

--

--

Sadrach Pierre, Ph.D.
Sadrach Pierre, Ph.D.

Written by Sadrach Pierre, Ph.D.

Writer for Built In & Towards Data Science. Cornell University Ph. D. in Chemical Physics.

Responses (1)