Using Pandas Value_Counts and matplotlib
Update
pandas.Series.value_counts
is aSeries
method- Plot with
pandas.Series.plot
withkind='bar'
orkind='barh'
import seaborn as sns# test data, loads a pandas dataframedf = sns.load_dataset('planets')# display(df.head(3)) method number orbital_period mass distance year0 Radial Velocity 1 269.300 7.10 77.40 20061 Radial Velocity 1 874.774 2.21 56.95 20082 Radial Velocity 1 763.000 2.60 19.84 2011# plot value_counts of Seriesax = df.method.value_counts().plot(kind='barh')ax.set_xscale('log')
Original Answer
I think you can use barh
:
CountStatus.plot.barh()
Sample:
CountStatus = pd.value_counts(df['scstatus'].values, sort=True)print CountStatusAAC 8AA 7ABB 4dtype: int64CountStatus.plot.barh()