← 01 Python for ML: NumPy & pandas
Area 01 test · Foundations

Python for ML: NumPy & pandas

20 questions · 70% to pass · no time limit. You see the right answers and why after you submit.

  1. 1Which structure is best for looking up revenue by region name?
  2. 2What does [p * 2 for p in prices if p < 20] produce?
  3. 3Why is a * 2 on a NumPy array much faster than a list comprehension?
  4. 4X has shape (100, 5). What is the shape of X.mean(axis=0)?
  5. 5Which pair of shapes does NOT broadcast?
  6. 6X - X.mean() is used to centre features. What is wrong?
  7. 7What does a[a > 0] return?
  8. 8You take b = a[1:3] and set b[0] = 99. What happens to a?
  9. 9Which gives reproducible random numbers?
  10. 10What is a pandas Series?
  11. 11df.loc[df.price > 10, "qty"] selects…
  12. 12coupon is optional and often NaN. What does df.dropna() do?
  13. 13Total revenue per month in one line:
  14. 14You need every order plus its region when known. Which join?
  15. 15After a merge you have MORE rows than orders. Most likely cause?
  16. 16A numeric column shows dtype object. Most likely cause?
  17. 17Which plot shows the distribution of one numeric column?
  18. 18Your notebook gives a different number after Restart & Run All. Why?
  19. 19Why use one virtual environment per project?
  20. 20In the lab, regions do not add up to the total revenue. What do you look at first?
0 of 20 answered