including 'nan' as a string pandas code example Example: pandas dataframe convert nan to string df.fillna('', inplace=True)