text_plain_output_1.png image_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('/kaggle/input/gun-violence-data/gun-violence-data_01-2013_03-2018.csv')

p_null = (len(df) - df.count()) * 100.0 / len(df)
p_null

train = df[['date', 'state', 'city_or_county', 'address', 'n_killed', 'n_injured']]
df.isnull().any()

plt.figure(figsize=(18, 12))
state = df['state'].value_counts()
sns.barplot(state.values, state.index)
plt.xlabel('Number of incidences', fontsize=15)
plt.ylabel('States', fontsize=15)
plt.title('Данные о насилии и оружии в Штатах', fontsize=20)
sns.despine(left=True, right=True)
plt.show()