✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Plotly graphs too big in a notebook

My notebook is too big because of plotly graphs i plot. I read it is because of js code source and maybe include plotlyjs = False would be useful. But i use plotly_express and i don’t know how to change this parameter.

Is there a simple way to reduce the memory a graph takes?

For instance if my code was:
import pandas as pd
import plotly_express as px
df=pd.DataFrame({“col1”:[“a”,“b”],“col2”:[1,2]})
px.bar(df,x=“col1”,y=“col2”)

How would I do ?

hello eduardo, thx for your answer but i meant that the file is too big (several MB), i would like it smaller

Sorry I didn’t see that you mentioned the memory :woozy_face: