Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Mean, Sum, Median Vales

Hello,

I am new to plotly and I wonder if someone could help with the following.

I am trying to plot the average/mean of the mpg in each year, but the below plot shows the entire range of the mpg in each year. In seaborn I could add the parameter “estimate” = mean. Is there a simlar parameter in Plotly?

Thank you very much for your help!

image

Plotly does not as a rule do this kind of aggregation, with the notable exception of the histogram trace type, so you’ll have to do this aggregation work ahead of time in Pandas before visualizing the data.

Thank you very much for your response!! I have seen the ‘transforms’ parameter to aggregate in plotly (see link below). Is this not available in graph_objects? Thanks again for your help!

This is available in graph_objects yes but it’s much slower and clunkier than using Pandas, and is not exposed via Plotly Express.

1 Like