Aggregator functions for plotly.express.scatter

When we use scatter from plotly.express, it is possible that there are more than one value of Y for a given X. The default behavior is to create a dot for each of these X and Y. It will be good if there is an additional optional input called aggfunc which could be one [‘min’, ‘max’, ‘mean’, ‘std’].

In pandas it would just need to the data to go through this:
data = data.groupby(XNAME).agg(aggfunc)