Trendline - Slope

Is there a was to display the slope of the trendline using
fig = px.scatter(df, x=x, y=y, trendline=“ols”)

Hi, you should be able to access the results of the OLS model and add an annotation manually.

Search for Fitting multiple lines and retrieving the model parameters in the following page: