Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. dataset['CabinDeck'] = dataset.apply(lambda row:
  2. str(row['Cabin'])[0] if str(row['Cabin'])[0] != 'n'
  3. else row['Cabin'], axis=1)
  4.  
  5. sns.set(font_scale=1.5)
  6. plt.style.use('seaborn-whitegrid')
  7. g = sns.barplot('CabinDeck','Survived', data=dataset[dataset['CabinDeck'] != 'T'].sort_values('CabinDeck'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement