Five Rows One Eighty

A nightly report joins orders to a contacts table. orders["amount"].sum() was 100 before the join.

orders = pd.DataFrame({
    "order_id":    [1, 2, 3],
    "customer_id": [7, 7, 9],
    "amount":      [50, 30, 20],
})

contacts = pd.DataFrame({          # customer 7 registered two addresses
    "customer_id": [7, 7, 9],
    "email":       ["ana@x", "ana@y", "kim@z"],
})

report = orders.merge(contacts, on="customer_id", how="left")
print(len(report), report["amount"].sum())

What prints, and which single keyword argument would have made pandas raise instead of returning it quietly?

A

6 200, and validate="one_to_one" would catch it, since a left join of two 3-row frames is a cross product.

B

5 180, and validate="many_to_one" would raise MergeError because the right frame's key is not unique.

C

3 100, and indicator=True would have added a _merge column flagging the duplicated keys.

D

5 180, and indicator=True would raise because two output rows carry the same _merge value.