Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: Matplotlib rotated x tick labels 
Python :: print in python without using print 
Python :: Fast api importing optional 
Python :: python message from teams 
Python :: insert data in django models 
Python :: heroku django procfile 
Python :: find max value in list python 
Python :: pil.jpegimageplugin.jpegimagefile to image 
Python :: subarray in python 
Python :: how to put song in pygame 
Python :: how to make program speak in python 
Python :: python ordered dict to dict 
Python :: capitalize first letter of each word python 
Python :: list square python 
Python :: list files in python 
Python :: how to write a code for anagram in python 
Python :: python return value from single cell dataframe 
Python :: django model form 
Python :: python sets 
Python :: python equals override 
Python :: pandas dataframe.to_dict 
Python :: tkinter window size position 
Python :: counter in python 
Python :: python copy a dictionary to a new variable 
Python :: play music pygame 
Python :: mode with group by in python 
Python :: Python NumPy repeat Function Example 
Python :: python division 
Python :: np.mean 
Python :: all frequency offset in pandas 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =