✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Scatter plot trendline not showing on top of datapoints

Hi there! I was wondering how I could have the trendline showing on top of the data points. It is supposed to be really easy but I am not able to find a way to do it.

px.scatter(df, x="exterior_temperature", y="energy_consumption", trendline="lowess").update_traces(line_color='red',marker_color= 'blue')