Using Display Function for Chart View in Fabric Notebooks

Answer Correct answer: D — The display function makes the Spark DataFrame available in the Chart view for interactive exploration in Microsoft Fabric notebooks.

You are analyzing the data in a Fabric notebook. You have a Spark DataFrame assigned to a variable named df. You need to use the Chart view in the notebook to explore the data manually. Which function should you run to make the data available in the Chart view?

  1. displayHTML
  2. show
  3. write
  4. display Correct Answer

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests the specific visualization capabilities of Microsoft Fabric's notebook environment versus standard PySpark/Scala behavior, where display enables rich UI features like charts.

The display function is required to enable the Chart view for interactive data exploration of Spark DataFrames in Microsoft Fabric notebooks. This page establishes that display is the correct method compared to standard Spark commands.

Candidates often choose 'show' because it is the standard way to print DataFrame contents in native PySpark or Databricks, but 'show' does not trigger the interactive Chart view in Fabric.

Community Discussion (15 comments)

stilferx 👍 12 Selected: D
IMHO, the answer is D. Link is here: https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-visualization Point is: You can use the display function on dataframes that created in PySpark and Scala on Spark DataFrames or Resilient Distributed Datasets (RDD) functions to produce the rich dataframe table view and chart view.
TashaP 👍 5
D is the correct answer (the keyword is chart view) A is another possibility for displaying data but not based on the requirements of this question, it is separate from chart view. https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-visualization
NRezgui 👍 1 Selected: D
display
Sowwy1 👍 1
I think it's D.
Rakesh16 👍 1 Selected: D
Display
arrow040 👍 2
The .show function displays the contents of a Spark DataFrame in a tabular format within the notebook but does not enable interactive data exploration with the Chart view. To make the data available in the Chart view for interactive visualization, you should use the display function (Answer D)
Miro_dd 👍 3 Selected: D
Display dataframe function should be correct
SilvanoRamalho 👍 1 Selected: D
D. DISPLAY
Gabonia 👍 1
Show is the correct answer Thank you.
gshopper 👍 2
B: show is correct. plt.show()
fhlos 👍 1 Selected: D
display(df)
Fmy 👍 1 Selected: D
Display(df) Allows you to view the data in chart
mtroyano 👍 2 Selected: D
Checked, the correct option is Display.
Momoanwar 👍 2 Selected: D
Display allow to see chart and inspect statistiques
wojciech_wie 👍 1
D is correct

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The display function is a Microsoft Fabric-specific extension that renders DataFrames and RDDs in a rich interactive interface. This interface includes tabs for Table, Chart, Map, and other visualizations, directly satisfying the requirement to use the Chart view.

Why the Other Options Are Wrong

show (Option B) prints the DataFrame content as plain text in the output cell, lacking interactive charting capabilities. displayHTML (Option A) is used to render custom HTML strings, not structured data exploration. write (Option C) is used for persisting data to storage systems, not for visualization.

Community Comment Notes

Community consensus strongly supports Option D. Commenters note that while show works for basic viewing, only display unlocks the full visualization suite including charts. One user explicitly linked to official documentation confirming this distinction.

Official Reference

Exam Strategy

Distinguish between standard Apache Spark functionality and Microsoft Fabric's proprietary enhancements. When questions mention 'Chart view', 'interactive exploration', or 'Fabric notebook', prioritize display over standard Spark commands like show.

Frequently Asked Questions

Why is show incorrect for Chart view?

Show only renders text output. It does not create the interactive widget required for switching to the Chart tab.

Does display work on RDDs too?

Yes, the display function supports both Spark DataFrames and Resilient Distributed Datasets (RDDs) in Fabric notebooks.

Related Analysis

Practice All DP-600 Questions

Access 115 questions with complete answers and detailed explanations.

View Full DP-600 Practice Test →

← Back to DP-600 Study Guide