# Aggregator functions for plotly.express.scatter

**URL:** <https://community.plotly.com/t/aggregator-functions-for-plotly-express-scatter/36356>\
**Category:** plotly.js\
**Created:** [March 18, 2020, 11:27am UTC](https://community.plotly.com/t/aggregator-functions-for-plotly-express-scatter/36356 "2020-03-18T11:27:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sureshj](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sureshj](https://community.plotly.com/u/sureshj)\
**Post date:** [March 18, 2020, 11:27am UTC](https://community.plotly.com/t/aggregator-functions-for-plotly-express-scatter/36356/1 "2020-03-18T11:27:50Z")

</div>

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)
