【发布时间】:2017-06-04 23:42:33
【问题描述】:
升级到 matplotlib 2.0 后,我很难让 seaborn 绘制一个pairplot。比如……
sns.pairplot(df.dropna(), diag_kind='kde') 返回以下错误TypeError: slice indices must be integers or None or have an __index__ method。我的数据中没有任何 Nans。事实上,删除 kde 选项可以让函数运行。
知道发生了什么吗?
【问题讨论】:
-
您能否提供一个minimal reproducible example 作为每个人都可以运行并重现错误的测试用例?这将有助于根据使用的数据来确定是问题还是 matplotlib、seaborn 和 pandas 之间的一般问题。
标签: python matplotlib seaborn