Using Display Function for Chart View in Fabric Notebooks

DP-600 By islever Editorial Last updated

Short answer

D The display function makes the Spark DataFrame available in the Chart view for interactive exploration in Microsoft Fabric notebooks.

Question

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

Key Takeaways

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.

Common mistake: 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.

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

https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-visualization

This link opens the official vendor documentation in a new tab.

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.

More DP-600 FAQ →

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.

Discussion 14 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors, not of islever. The comments shown first are the most substantive of the thread — ranked by depth, community endorsement and relevance; expand the list below to read the rest.

From public community threads 14

  1. stilferx 👍 12 Answered 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.
  2. 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
  3. Miro_dd 👍 3 Answered D
    Display dataframe function should be correct
  4. 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)
  5. Momoanwar 👍 2 Answered D
    Display allow to see chart and inspect statistiques
Show 9 more comments
  1. mtroyano 👍 2 Answered D
    Checked, the correct option is Display.
  2. gshopper 👍 2
    B: show is correct. plt.show()
  3. Fmy 👍 1 Answered D
    Display(df) Allows you to view the data in chart
  4. Gabonia 👍 1
    Show is the correct answer Thank you.
  5. Sowwy1 👍 1
    I think it's D.
  6. wojciech_wie 👍 1
    D is correct
  7. fhlos 👍 1 Answered D
    display(df)
  8. SilvanoRamalho 👍 1 Answered D
    D. DISPLAY
  9. NRezgui 👍 1 Answered D
    display

Reader comments & corrections

No reader corrections 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.

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