【发布时间】:2018-04-23 04:11:17
【问题描述】:
我有一个带有索引时间戳和百分比(astype float)的系列(114 行)。
testseries.head()
Out[100]:
Timestamps
2018-04-19 13:23:57-04:00 0.000161238
2018-04-06 13:59:50-04:00 -0.0169348
2018-04-04 11:39:41-04:00 0.0475188
2018-04-03 14:53:37-04:00 -0.00231244
2018-03-29 14:09:57-04:00 0.0209815
Name: Change, dtype: object
我正在尝试创建这些分布的直方图,就像我之前做过几次一样,但是当我调用时得到了意想不到的结果
testseries.hist()
我尝试了各种选项,例如设置 density=True、更改 bin 的数量或在 matplotlib 与 pandas 中绘图,但结果始终是一系列高度等于 y- 最大值的细条轴。
这是什么原因造成的?
【问题讨论】:
标签: python python-3.x pandas matplotlib