I understand you are using the LCG 102b software stack in SWAN, which is set by default when you start you session. That stack has an older version of plotly that does not provide a backend for pandas.
In order to use an updated version of plotly, you can select the “Bleeding edge” software stack in the web form when you start you SWAN session. If you do that, the code snippet above should work. This new version of plotly will also make it into the forthcoming LCG 104, which we will make available in SWAN when it is published. But for now you can just use “Bleeding edge”.