Plotting in pyspark.pandas Uncaught ReferenceError Plotly is not defined

Data_Cowboy
New Contributor III

Hi,

I am trying to plot using pyspark.pandas running this sample code:

speed = [0.1, 17.5, 40, 48, 52, 69, 88]
lifespan = [2, 8, 70, 1.5, 25, 12, 28]
index = ['snail', 'pig', 'elephant',
         'rabbit', 'giraffe', 'coyote', 'horse']
psdf = ps.DataFrame({'speed': speed,
                     'lifespan': lifespan}, index=index)
psdf.plot.bar()

When I run the code, it returns the following error:

Error Message 

This code can be found in this notebook from Microsoft (https://docs.microsoft.com/en-us/azure/databricks/_static/notebooks/pandas-to-pandas-api-on-spark-in-10-minutes.html).

Is there something that I need to define Plotly?

Please let me know if I may provide any additional information. Thank you for your assistance.