diff --git a/docs/wi24-final/index.html b/docs/wi24-final/index.html index bb074b8..413b9f1 100644 --- a/docs/wi24-final/index.html +++ b/docs/wi24-final/index.html @@ -363,13 +363,29 @@

Problem 1.5

cond2 = hotels["Location"] == "Coronado" combined = hotels[cond1].merge(hotels[cond2], on="Hotel Name", how=???)
    -
  1. If we replace ??? with "inner" in the -code above, which of the following will be equal to -combined.shape[0]?

  2. -
  3. If we replace ??? with "outer" in the -code above, which of the following will be equal to -combined.shape[0]?

  4. +
  5. If we replace ??? with "inner" in the code +above, which of the following will be equal to +combined.shape[0]?
+ +
    +
  1. If we replace ??? with "outer" in the code +above, which of the following will be equal to +combined.shape[0]?
  2. +
+

diff --git a/problems/wi24-final/wi24-final-q01.md b/problems/wi24-final/wi24-final-q01.md index d07ea41..2a1f945 100644 --- a/problems/wi24-final/wi24-final-q01.md +++ b/problems/wi24-final/wi24-final-q01.md @@ -124,8 +124,20 @@ Consider the code below. 1. If we replace `???` with `"inner"` in the code above, which of the following will be equal to `combined.shape[0]`? +( ) `min(cond1.sum(), cond2.sum())` +( ) `(cond1 & cond2).sum()` +( ) `cond1.sum() + cond2.sum()` +( ) `cond1.sum() + cond2.sum() - (cond1 & cond2).sum()` +( ) `cond1.sum() + (cond1 & cond2).sum()` + 2. If we replace `???` with `"outer"` in the code above, which of the following will be equal to `combined.shape[0]`? +( ) `min(cond1.sum(), cond2.sum())` +( ) `(cond1 & cond2).sum()` +( ) `cond1.sum() + cond2.sum()` +( ) `cond1.sum() + cond2.sum() - (cond1 & cond2).sum()` +( ) `cond1.sum() + (cond1 & cond2).sum()` + # BEGIN SOLUTION **Answers**: