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

Part 2 (5 points, coding task)

Do the following tasks in this part.

  1. Create a DataFrame object called df_2 that keeps the following columns in df_1 (all other columns in df_1 shall not appear in df_2):

    • Survived

    • Sex

    • Age

    • SibSp

    • Parch

    • Fare

    • Embarked

  2. Print the first 5 rows of df_2.

  3. Print the shape of df_2.

### WRITE YOUR SOLUTION HERE ###

df_2 = df_1[['Survived', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare', 'Embarked']]

print(df_2.head())

""" END OF THIS PART """