We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
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)
car_sales_missing.fillna({"Odometer": car_sales_missing["Odometer"].mean()}, , inplace=True)
Sorry, something went wrong.
@DarkDk123 thank you. This should be updated in the course itself. @mrdbourke ?
by the way, i am using pandas 2.2.2 the correct line should be
car_sales_missing.fillna({"Odometer": car_sales_missing["Odometer"].mean(numeric_only=True)}, inplace=True)
@DarkDk123 forgot about numeric_only=True and has an extra ,
numeric_only=True
,
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: