Open CruIIer opened 2 weeks ago
Because you're performing "Chained Indexing", and it has inherently unpredictable results (may return a view or copy)
So it's suggested by pandas to modify DataFrames directly, not on view-or-copy,
Instead, You can use this car_sales_missing.fillna({"Odometer": car_sales_missing["Odometer"].mean()}, , inplace=True)
https://academy.zerotomastery.io/courses/complete-machine-learning-and-data-science-bootcamp-2020/lectures/12693715
In this section we are doing the inplace=True. It works but it hits with Warning![image](https://github.com/mrdbourke/zero-to-mastery-ml/assets/126068744/cee3d160-5eaa-422c-b9a8-365882a0e77e)