seaborn: Selected KDE bandwidth is 0. Cannot estimate density

后端 未结 5 781
北恋
北恋 2021-01-04 18:32
import pandas as pd
import seaborn as sns

ser_test = pd.Series([1,0,1,4,6,0,6,5,1,3,2,5,1])
sns.kdeplot(ser_test, cumulative=True)

The above code g

5条回答
  •  忘掉有多难
    2021-01-04 19:12

    The problem occurs because of statsmodels.

    Anyway, to solve the issue for seaborn version starting from 0.10.0, just place diag_kws={'bw': 1} as arg.

    Try to figure out the optimal value for bandwidth.

提交回复
热议问题