Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Certified Associate Developer for Apache Spark topic 1 question 107 discussion

The code block shown below should create a single-column DataFrame from Scala list years which is made up of integers. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.

Code block:

__1__.__2__(__3__).__4__

  • A. 1. spark
    2. createDataFrame
    3. years
    4. IntegerType
  • B. 1. spark
    2. createDataset
    3. years
    4. IntegerType
  • C. 1. spark
    2. createDataset
    3. List(years)
    4. toDF
  • D. 1. spark
    2. createDataFrame
    3. List(years)
    4. IntegerType
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Sowwy1
1 month, 2 weeks ago
I think it's C C. 1. spark 2. createDataset 3. List(years) 4. toDF it says "Scala list"
upvoted 1 times
Sowwy1
1 month, 1 week ago
It's part of official databricks questions: Question 44 Which of the following code blocks creates a single-column DataFrame from Scala Listyears which is made up of integers? A. spark.createDataset(years).toDF B. spark.createDataFrame(years, IntegerType) C. spark.createDataset(years) D. spark.DataFrame(years, IntegerType) E. spark.createDataFrame(years) --> and the answer here is A.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...