I have a Pandas Dataframe as shown below:
1 2 3
0 a NaN read
1 b l unread
2 c NaN read
I want to remove the
I tried with one column of string values with nan.
To remove the nan and fill the empty string:
df.columnname.replace(np.nan,'',regex = True)
To remove the nan and fill some values:
df.columnname.replace(np.nan,'value',regex = True)
I tried df.iloc also. but it needs the index of the column. so you need to look into the table again. simply the above method reduced one step.