Filling column using Average

I filled only one column using average but all others columns(which were not filled initially ) after that gets automatically filled.Why is it so?

Please share your ipynb file.


It is showing this
How to share then?

Just upload your ipynb on your google drive, make it sharable, and share the link here.

https://drive.google.com/file/d/1OQSTRy0sxyKjtdOwLf37srilKTUkJfrl/view?usp=sharing

The error is in the line data_clean=data_clean.fillna(data_clean[“LotFrontage”].mean())
Here you are replacing all na with mean of “LotFrontage” column.

If you want to replace na values only in specific columns use this:
data_clean[“LotFrontage”].fillna(data_clean[“LotFrontage”].mean())

Hope this cleared your doubt.

Ya I forgot to specify columns…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.