首页 > 解决方案 > IntegrationWarning:使用Seaborn时检测到舍入错误的发生

问题描述

我正在使用 Seabornkdeplot绘制数据的累积分布。每个数据帧大约有 150 万行长。我将它们连接成一个大数据框。

当我尝试绘制它们时,我收到以下警告:

IntegrationWarning: The occurrence of roundoff error is detected, which prevents the requested tolerance from being achieved.  The error may be underestimated 
warnings.warn(msg, IntegrationWarning)
/home/my_computer/anaconda3/lib/python3.7/site-packages/scipy/integrate/quadpack.py:385

当我仅连接三个数据框时,它可以工作并显示图表。但后来我连接 10 我得到了警告。

这是我调用 kdeplot 的示例:

sns.kdeplot(df_list[i][header], cumulative=True, legend=False, ax=ax1)

有没有办法来解决这个问题?

对数据帧进行采样以使用更少的行是否有效?

标签: pythonscipyseaborn

解决方案


推荐阅读