Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- classes = [pd.DataFrame(titanic[titanic.Pclass == i]['Age']) for i in range(1,4)]
- f, ax = plt.subplots(1,3, sharey=True,figsize=(16,5))
- ax[0].set_ylabel('Scaled number of passengers')
- for i in range(3):
- ax[i].hist(classes[i].values, 30,
- color='blue',
- #linewidths=1,
- normed=True)
- ax[i].set_title('Class '+str(i+1))
- ax[i].set_xlabel('Age')
- plt.show()
- #classes[0]
- #titanic[titanic.Pclass == 1].groupby(['Age']).size()/maxCount
- #maxCount
- #classes[0].values
- #np.random.randn(1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement