How to update values of a column with only NaN value in pandas dataframe?

How to update values of a column with only NaN value in pandas dataframe?

1 Like

Hello Nilanjan,

do you mean to fill the empty values of a dataset with NaN values? If so, check the .replace function:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.replace.html

If you mean to replace NaN values for other ones, check the fillna function:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.fillna.html

1 Like