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

Part 4 (5 points, coding task)

Do the following tasks in this part.

  1. Create a deep copy of df_3, named df_4.

  2. In df_4, create a new column called GroupSize. Its value is equal to SibSp + Parch + 1.

  3. Print the first five rows of df_3 and df_4.

  4. Print the shapes of df_3 and df_4.

### WRITE YOUR SOLUTION HERE ###
df_4 = copy.deepcopy(df_3)

df_4['GroupSize'] = df_4['SibSp'] + df_4['Parch'] + 1

print(df_3.head())
print(df_4.head())

print(df_3.shape)
print(df_4.shape)

""" END OF THIS PART """