I’ve got a pandas DataFrame filled mostly with real numbers, but there is a few nan
values in it as well.
How can I replace the nan
s with averages of columns where they are?
This question is very similar to this one: numpy array: replace nan values with average of columns but, unfortunately, the solution given there doesn’t work for a pandas DataFrame.