我想制作熊猫系列的直方图(prior_fails),但我不断收到以下 ValueError:
ValueError: view limit minimum -36814.8560105 is less than 1 and is an
invalid Matplotlib date value. This often happens if you pass a non-datetime
value to an axis that has datetime units
这就是我调用直方图的方式
plt.hist(prior_fails)
plt.ylabel('Frequency')
plt.xlabel('Days of Failure (%)')
先前失败是具有以下索引的系列:
prior_fails.index
Out[85]:
Index([u'prior110', u'prior113', u'prior118', u'prior141', u'prior144',
u'prior16', u'prior217', u'prior223', u'prior245', u'prior29',
u'prior352', u'prior360', u'prior370', u'prior438', u'prior55',
u'prior59', u'prior60', u'prior68', u'prior74', u'prior88'],
dtype='object')
和内容:
prior_fails
Out[86]:
prior110 13.962170
prior113 10.861125
prior118 21.304131
prior141 11.309109
prior144 11.363863
prior16 14.479841
prior217 10.403186
prior223 14.201095
prior245 7.974116
prior29 17.401692
prior352 9.860627
prior360 12.339472
prior370 16.207068
prior438 16.381284
prior55 20.587357
prior59 10.452962
prior60 15.828771
prior68 16.769537
prior74 16.918865
prior88 9.805874
dtype: float64
任何帮助将不胜感激。我对python相当陌生。谢谢!
慕村9548890
相关分类