简体   繁体   English

使用 matplotlib 绘制 hist

[英]Plot the hist using matplotlib

Below is the dataframe下面是数据框

             Quantity   UnitPrice   CustomerID
Country         
Netherlands  200128     6492.55     34190538.0
EIRE         142637     48447.19    110391745.0
Germany      117448     37666.00    120075093.0
France       110480     43031.99    107648864.0
Australia    83653      4054.75     15693002.0

How to plot a histogram with condition x axis as country(rotate 90) and Quanity on Y axis如何绘制条件 x 轴为国家(旋转 90)和 Y 轴数量的直方图

df.hist(x,y)

You can try with this:你可以试试这个:

df.plot.bar(y='Quantity')

Here's the output:这是输出: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM