index_size= 10
column_size = 1
df = pd.DataFrame(np.zeros((index_size, column_size)))
df.columns = ['Value']
df.iat[0,0] = 5
df.iat[1,0] = 6
df.iat[5,0] = 8
df.hist(column='Value')
I get the below graph with 'Value' on X-axis and indices (0-9) on Y-axis but i want indices on X-axis and 'Value' on Y-axis.
I am expecting a graph like below:

Use parameter orientation, unfortunately it not in DataFrame.plot.hist documentation, because it contains last kwds parameter.
Parameter is possible find in matplotlib.pyplot.hist.
df.hist(column='Value', orientation="horizontal")

EDIT:
Histogram plot counted values:
print (df['Value'].value_counts())
0.0 7
8.0 1
6.0 1
5.0 1
Name: Value, dtype: int64
If need plot bar or barh:
df.plot.bar()

df.plot.barh()

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With