pandas why does NaN value get changed to string nan code example Example: pandas dataframe convert nan to string df.fillna('', inplace=True)