- This event has passed.
8 AM – AI/ML – Joel
March 28 @ 8:00 am - 9:00 am
Today we did:
- We started working on the Titanic Survivor Project.
Homework:
- #Make this function return only
#from the name in the dataset
#the title (Mr., Miss., Master., Mrs., etc.)
#The way to do it, is to continually use the .split() function
#.split() takes in an argument by which to split
#For example: .split(“,”) will split a string by comma
#so if name = “Mr, Hi”, name.split(“,”) will result in a list with items [“Mr”, “Hi”]
#Then, index the list by the index you want to take the item of
#For example, in this [“Mr”, “Hi”] list, if you want to take the title, you take
#split(“,”)[0] because index 0 is the first element which is “Mr”
#Use multiple of this split function to eventually only get the title part of the string
#If you need to, use the .strip() function to remove any spaces in a string
#And you can add characters to a string if necessary.