I am trying to add missing values to a column after filtering with a condition using fillna() method. It fills and shows the values but does not update in the dataframe. Tried using the inplace parameter as well. Here is the code I wrote:
csm[csm.Make == "Maruti"]["Odometer (KM)"].fillna(csm[csm.Make == "Maruti"]["Odometer (KM)"].mean(), inplace = True)
Please help me with the solution on how to fix this issue!