text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df = pd.read_csv('../input/911.csv')

df['Reason'] = df['title'].apply(lambda title: title.split(':')[0])

df['Departments'] = df['title'].apply(lambda title: title.split(':')[1])

sns.despine(left=True)

sns.countplot(x='Day of Week', data=df, hue='Reason', palette='viridis')
sns.despine(left=True)
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.0)
plt.show()