nerdexam
MicrosoftMicrosoft

DP-500 · Question #137

DP-500 Question #137: Real Exam Question with Answer & Explanation

Sign in or unlock DP-500 to reveal the answer and full explanation for question #137. The question stem and answer options stay visible for context.

Implement and manage a data analytics environment

Question

You have the following code in a cell in an Azure Synapse notebook. # insert command here new_rows = [('WA',2,45000), ('WA',35,65000),('WA',50,85000)] demo_df = spark.createDataFrame(new_rows, ('state', 'age', 'salary')) demo_df.createOrReplaceTempView('demo_df') You need to replace the comment on the first line of the code with the correct magic command. Which magic command should you use?

Options

  • A%%pyspark
  • B%pyspark
  • C%%spark
  • D%%sql

Unlock DP-500 to see the answer

You've previewed enough free DP-500 questions. Unlock DP-500 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Synapse Notebooks#PySpark#Magic Commands#Spark Environment
Full DP-500 PracticeBrowse All DP-500 Questions