[英]unable to plot histogram(hist2d)
嘗試 plot 對象長度與使用 hist2d 的對象總數。 我收到以下錯誤。 你能幫我找出錯誤嗎?
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
count=799.000000
plt.hist2d(length,count,bins = 10)
plt.xlabel('count')
plt.ylabel('length')
plt.grid(True)
plt.show()
print(length)
1 3.978235
2 4.740024
3 3.470375
4 3.978235
5 3.808948
...
807 5.078597
808 4.655381
809 4.232164
810 4.655381
811 3.470375
Name: length_mm, Length: 799, dtype: float64
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.