Question 26

Which of the following code blocks prints out in how many rows the expression Inc. appears in the string-type column supplier of DataFrame itemsDf?
  • Question 27

    The code block shown below should return only the average prediction error (column predError) of a random subset, without replacement, of approximately 15% of rows in DataFrame transactionsDf. Choose the answer that correctly fills the blanks in the code block to accomplish this.
    transactionsDf.__1__(__2__, __3__).__4__(avg('predError'))
  • Question 28

    Which of the following describes a difference between Spark's cluster and client execution modes?
  • Question 29

    The code block shown below should convert up to 5 rows in DataFrame transactionsDf that have the value 25 in column storeId into a Python list. Choose the answer that correctly fills the blanks in the code block to accomplish this.
    Code block:
    transactionsDf.__1__(__2__).__3__(__4__)
  • Question 30

    The code block displayed below contains an error. The code block should return a new DataFrame that only contains rows from DataFrame transactionsDf in which the value in column predError is at least 5. Find the error.
    Code block:
    transactionsDf.where("col(predError) >= 5")