%matplotlib inline
import numpy as np
import datetime
import pandas as pd
import matplotlib
import seaborn as sns
#read csv file
df = pd.read_csv('testgroups.csv', sep=";")
#show csv file column names with first lines
df.head()
# bar plot
df['segment'].value_counts().plot(kind='bar')
# horizontal bar plot
df['test_group'].value_counts().plot(kind='barh')
# line plot
df['segment'].value_counts().plot(kind='line')
# grouped plot
newDf = pd.DataFrame({'count' : df.groupby(['test_group','segment']).size()}).reset_index()
sns.factorplot(x="segment", y='count', col="test_group", data=newDf, kind="bar")