2025 USA-NA-AIO Round 1, Problem 3, Part 7

Part 7 (5 points, coding task)

Do the following tasks in this part.

  1. Define X that keeps all features in df_6 and drops the label column Survived.

  2. Define y that keeps the label column Survived in df_6 only.

  3. Print the types of objects X and y.

  4. Print the first five rows of X and the first five elements in y.

### WRITE YOUR SOLUTION HERE ###
X = df_6.drop(columns=['Survived'])
y = df_6['Survived']

print(type(X))
print(type(y))

print(X.head())
print(y.head())

""" END OF THIS PART """