Question: Python / Pandas: Let's say that we wanted to predict a contestants personality type based on the information in the data files. Your task is

Python/Pandas: Let's say that we wanted to predict a contestants personality type based on the information in the data files. Your task is to create a DataFrame that lists the castaway_id, full_name and personality_type for each castaway contestant. However, since most machine learning algorithms use numeric data, you want to change the personality types to the following numbers:
ISTJ -1
ISTP -2
ISFJ -3
ISFP -4
INFJ -5
INFP -6
INTJ -7
INTP -8
ESTP -9
ESTJ -10
ESFP -11
ESFJ -12
ENFP -13
ENFJ -14
ENTP -15
ENTJ -16
Missing values -17
Save this new DataFrame as Q14 and sort based on castaway_id in ascending order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!