Using Display Function for Chart View in 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?
Community Votes
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)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Thedisplay 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 whileshow 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 →