[solved] Unable to add trendlines to subplots following the same code on plotly website

Hi @oat, as the error message says at the end, you have to install statsmodels (pip install statsmodels or conda install statsmodels) since this module is used for computing the trendlines. It is an optional dependency of plotly.py, we try to keep the list of required dependencies small but it means that sometimes you have to install additional packages.

1 Like