How can I fill NaN values in a Pandas DataFrame in Python?
You can use the DataFrame.fillna function to fill the NaN values in your data. For example, assuming your data is in a DataFrame called df, 

df.fillna(0, inplace=True)


will replace the missing values with the constant value 0. You can also do more clever things, such as replacing the missing values with the mean of that column:

df.fillna(df.mean(), inplace=True)


or take the last value seen for a column:

df.fillna(method='ffill', inplace=True)


Filling the NaN values is called imputation. Try a range of different imputation methods and see which ones work best for your data.