フリー問題

Databricks Certified Machine Learning Professional のフリー問題 2 / 20 問目

問題文

A grouped pandas function returns a pandas DataFrame with columns named store, forecast date, and predicted units. The job fails before any group is processed. What is the most likely cause?

選択肢

  1. The output schema was not declared, so Spark cannot know the types of the returned columns before running the function, since the plan is built before any group runs.
  2. The number of returned rows must equal the number of input rows in the group, so a 14-row forecast from a 90,000-row group is rejected, and the function must pad its output to match.
  3. The grouping column must be excluded from the returned columns, so including the store column raises an error, and dropping store from the returned frame lets groups run.
  4. The function returned a pandas DataFrame instead of a Spark DataFrame, which is never allowed, and the group API hands back a Spark frame instead.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。