Histogram replacement label dataframe.plot

I have a dataframe called df that looks like this:

   success        type
1  0.197642  Technique 1
2  0.177575  Technique 2
0  0.018519  Technique 3

Then I will build it: df.success.plot(kind="bar")

But the labels for the bars are 1.2.0. I would like them to be rows in a column like my framework. I am having trouble finding documentation on how to set up a histogram, except for changing the color of the columns.

+3
source share
1 answer
df.plot(x='type', y='success', kind='bar')
plt.xticks(rotation=25)

enter image description here

I found this by looking at the docstring :

In [11]: df.plot?
...
Parameters
----------
frame : DataFrame
x : label or position, default None
y : label or position, default None
    Allows plotting of one column versus another
+2
source

All Articles