returns the dataframe with the modified Title column in which the updated groupings are reflected. code example
Example: returns the dataframe with the modified Title column in which the updated groupings are reflected.
# Extract Title from Name, store in column and plot barplot
data['Title'] = data.Name.apply(lambda x: re.search(' ([A-Z][a-z]+)\.', x).group(1))
sns.countplot(x='Title', data=data);
plt.xticks(rotation=45);