Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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);
Source by www.datacamp.com #
 
PREVIOUS NEXT
Tagged: #returns #dataframe #modified #Title #column #updated #groupings
ADD COMMENT
Topic
Name
3+7 =