I'm trying to replace certain columns of my dataframe that contains NaN with 0's. For example, I have a column named 'CQ Exp Net Rep Liquid' that has some values in the column that are NaN.
I've tried running
df[['CQ Exp Net Rep Liquid']].fillna(0,inplace=True)
and then when I proceed to run
df[['CQ Exp Net Rep Liquid']].sample(n=10)
I am returning the column with NaNs still. I have tried df.bfill
as well to no avail. Does anyone know what is going on?