pandas sees nan as string instead of nan code example
Example 1: pandas dataframe convert nan to string
df.fillna('', inplace=True)
Example 2: represent NaN with pandas in python
import pandas as pd
if pd.isnull(float("Nan")):
print("Null Value.")