from dateutil.parser import parse

import matplotlib.pyplot as plt

import pandas as pd

import numpy as np
import pandas as pd
data = pd.read_csv('../input/3-Airplane_Crashes_Since_1908.txt')

import matplotlib.pyplot as plt
from dateutil.parser import parse
years = []
for i in range(len(data)):
    years.append(parse(data.Date[i]).year)
data.Fatalities = data.Fatalities.fillna(data.Fatalities.mean())
temp = zip(years, data.Fatalities)
temp = [(x, y) for (x, y) in temp if y > 50]
temp = pd.DataFrame(temp, columns=['massive_years', 'Fatalities'])
counts = temp.massive_years.value_counts()
plt.figure(figsize=(11, 7))
plt.bar(counts.index, counts.values)
plt.ylabel('Number of Massive Crashes(fatalities>50)', fontsize=15)
plt.xlabel('Year', fontsize=15)
plt.yticks(fontsize=15)
plt.xticks(fontsize=15)