Question 1

Which of the following code blocks adds a column predErrorSqrt to DataFrame transactionsDf that is the square root of column predError?
  • Question 2

    Which of the following code blocks concatenates rows of DataFrames transactionsDf and transactionsNewDf, omitting any duplicates?
  • Question 3

    Which of the following code blocks reads in the JSON file stored at filePath as a DataFrame?
  • Question 4

    The code block shown below should return a two-column DataFrame with columns transactionId and supplier, with combined information from DataFrames itemsDf and transactionsDf. The code block should merge rows in which column productId of DataFrame transactionsDf matches the value of column itemId in DataFrame itemsDf, but only where column storeId of DataFrame transactionsDf does not match column itemId of DataFrame itemsDf. Choose the answer that correctly fills the blanks in the code block to accomplish this.
    Code block:
    transactionsDf.__1__(itemsDf, __2__).__3__(__4__)
  • Question 5

    The code block shown below should return a column that indicates through boolean variables whether rows in DataFrame transactionsDf have values greater or equal to 20 and smaller or equal to
    30 in column storeId and have the value 2 in column productId. Choose the answer that correctly fills the blanks in the code block to accomplish this.
    transactionsDf.__1__((__2__.__3__) __4__ (__5__))