<jupyter_start><jupyter_text>extract Mr,Miss,Mrs,etc.. from 'Name' column and use it to create new column and call it 'Title', then plot a countplot<jupyter_code>import seaborn as sns
import pandas as pd
import numpy as np

sns.set(rc={'figure.figsize':[20,15]},font_scale=1.1)
df=pd.read_csv('titanic_full.csv')
df.head()
def name(x):
    x=x.split(',')[1]
    return x.split('.')[0]

df['Title']=df['Name'].apply(name)
df
sns.countplot(x='Title',data=df)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17695473251028807, 'fraction_numerical': 0.01646090534979424, 'mean_word_length': 6.492307692307692, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '558635', 'license': 'MIT', 'n_tokens_mistral': 201, 'n_tokens_neox': 196, 'n_words': 42, 'path': 'titanic_full.ipynb', 'repo_name': 'nelsawaf/assignment10', 'size': '486'}