【发布时间】:2017-10-16 00:23:34
【问题描述】:
我正在尝试以这种方式在 Kaggle 笔记本上绘制 seaborn 直方图:
sns.distplot(myseries, bins=50, kde=True)
但我收到此错误:
TypeError: slice indices must be integers or None or have an __index__ method
这是 Kaggle 笔记本: https://www.kaggle.com/asindico/slice-indices-must-be-integers-or-none/
这是系列头:
0 5850000
1 6000000
2 5700000
3 13100000
4 16331452
Name: price_doc, dtype: int64
【问题讨论】:
-
你的系列是什么类型的?
-
@Kyle 我已经更新了问题
-
@Kyle 你是对的 kde=False 解决问题。如果您发布正确的答案,我可以为您分配赏金
标签: python pandas jupyter seaborn kaggle