0

I have dataframe df with column x , column x have many values i want to plot bar . divde data in bins from 0 to 1 2to 3 ,4 to 5. each bin bar and percentage of each bar

i tried this now but i dont know how to give percentage of each bar

out = pd.cut(xz, bins=[0,1, 2, 6,], include_lowest=True)
ax = out.value_counts(sort=False).plot.bar(rot=0, color="b", figsize=(6,4))
Edward
  • 563
  • 3
  • 11

0 Answers0