Plotly and Google Colab

Viewed 656

I am very knew to Google Colab, given that I couldn't get interactive plots using matplotlib I am using the Plotly express library for colab.

I have a dataframe (Pandas) called pdd of dimensions [15678, 120]

I am trying to plot all the columns in the same graph.

In the code below, I am first trying to plot Column 2 and 3 but it is creating the vector [2,3] instead of indexing those columns.

Does anyone know how to index columns using plotly express? or is it just possible to plot one variable at the time?

import plotly.express as px
from IPython.display import HTML

time =np.arange(len(pdd))

fig = px.scatter(data_frame=pdd, x=time, y=[2,3])
fig.show()
HTML(fig.to_html())
0 Answers
Related