Bar Chart

1x Categorical

Single categorical variable produces frequency chart.

In [362]:

tmpdf = mydf.groupby(['comp'],as_index=False).count()
tmpdf

Out[362]:

  comp  dept  grp  value1  value2  value3
0   C1    76   76      76      76      76
1   C2    62   62      62      62      62
2   C3    62   62      62      62      62

In [361]:

tmpdf.info()
<class 'pandas.core.frame.DataFrame'>
Index: 3 entries, C1 to C3
Data columns (total 5 columns):
dept      3 non-null int64
grp       3 non-null int64
value1    3 non-null int64
value2    3 non-null int64
value3    3 non-null int64
dtypes: int64(5)
memory usage: 144.0+ bytes

In [363]:

ggplot (tmpdf, aes(x='comp', y='grp')) +geom_col()

Out[363]:

<ggplot: (-9223371847041880039)>

results matching ""

    No results matching ""