Python Pandas直方图无法识别'by'分组参数

时间:2013-04-09 19:48:51

标签: python arguments pandas histogram

尝试通过分组生成直方图时收到错误消息。这是代码和错误消息。

我有0.9.1 Pandas版本

>>> data.hist(by=np.random.randint(0, 4, 1000))
(most recent call last):
 File "<stdin>", line 1, in <module>
 File "C:\Python27\lib\site-packages\pandas\tools\plotting.py", line 1671, in hist_series
 ax.hist(values, **kwds)
 File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 7868, in hist
 p.update(kwargs)
 File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 659, in update
 raise AttributeError('Unknown property %s'%k)
 AttributeError: Unknown property by

0 个答案:

没有答案