I am trying to update a column in my pandas dataframe but cannot figure out how to do it. I think I need to use .update, but I am not sure how.
My current dataframe looks like this (called auto_df):
| id | Make | Make (Encoded) | Model | Model (Encoded) | Score | Price | 
|---|---|---|---|---|---|---|
| 105 | Kia | 14 | Forte Lx | 103 | 0.0 | 15000 | 
| 106 | Nissan | 21 | Sentra S | 181 | 0.0 | 14998 | 
| 107 | Toyota | 26 | Avalon Xl | 22 | 0.0 | 14995 | 
| 108 | Chevrolet | 4 | Camaro Lt | 34 | 0.0 | 14995 | 
| 109 | Kia | 14 | Sportage Lx | 204 | 0.0 | 14995 | 
I have another dataframe with updated score values (called auto_df_non), and I want to replace the 0 values in this dataframe with the updated score values.
auto_df_non looks like this:
| id | Make | Make (Encoded) | Model | Model (Encoded) | Score | Price | 
|---|---|---|---|---|---|---|
| 105 | Kia | 14 | Forte Lx | 103 | 44.439907 | 15000 | 
| 106 | Nissan | 21 | Sentra S | 181 | 27.530042 | 14998 | 
| 107 | Toyota | 26 | Avalon Xl | 22 | 56.666503 | 14995 | 
| 108 | Chevrolet | 4 | Camaro Lt | 34 | 16.844859 | 14995 | 
| 109 | Kia | 14 | Sportage Lx | 204 | 14.013014 | 14995 | 
I have tried to get .update to work, but everything I have found on the internet so far has not been helpful.