application_vnd.jupyter.stderr_output_2.png text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

nRecords = 200000
snRecords = 1000
maindf = pd.read_csv('../input/database.csv')

maindf.drop(['Year', 'Month', 'Incident', 'City', 'Agency Name', 'Agency Type', 'Record Source', 'Agency Name'], axis=1, inplace=True)
df = maindf[maindf['Record ID'] < nRecords]
sdf = df[(maindf['Record ID'] < snRecords) & df['Victim Count'] > 0]

races = df['Perpetrator Race'].unique()

sns.countplot(x=df['Perpetrator Race'], hue=df['Crime Solved'], palette=sns.color_palette('Paired', len(races)), data=df)
plt.show()
sns.countplot(x=df['Victim Race'], hue=df['Crime Solved'], palette=sns.color_palette('Paired', len(races)), data=df)
plt.show()
sns.countplot(x=df['Victim Age'], hue=df['Crime Solved'], palette=sns.color_palette('Paired', len(races)), data=df)
plt.show()