Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

def extract_title(input_df):

def get_title(name):
    if '.' in name:
        return name.split(',')[1].split('.')[0].strip()
    else:
        return 'Unknown'

ans=get_title('Braund, Mr. Owen Harris')
print (ans)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #def
ADD COMMENT
Topic
Name
7+8 =