如何从 plotly interactive box plot 中删除异常值

how to remove outliers from plotly interactive box plot

我有以下从 plotly 获得的交互图。

import plotly.graph_objects as go
fig = go.Figure(layout=go.Layout(height=2000, width=1000))
for i in rendimento_fondi.columns:
    fig.add_trace(go.Box(x=rendimento_fondi[i], name=i))
fig.layout.title.text = "Box Plot: Performance vs # Fondi selezionati per la Monte Carlo"
fig.show()

生成这个

我想要的是去除异常值,这样它们就不会显示出来。 有人可以帮忙吗?

已解决,我找到了管理异常值的选项。

fig.add_trace(go.Box(y=rendimento_fondi[i], name=i, boxpoints = False))

这里是参考

https://plotly.com/python/box-plots/