Azure Databricks notebooks have built-in support for charts and visualizations. The visualizations described in this section are available when you use the
display command to view a data table result as a pandas or Apache Spark DataFrame in a notebook cell.
For information about legacy Databricks visualizations, see Legacy visualizations.
To create a visualization from a cell result, the notebook cell must use a
display command to show the result. Click + and select . The visualization editor appears.
In the Visualization Type drop-down, choose a type.
Select the data to appear in the visualization. The fields available depend on the selected type.
If you hover over the top right of a chart in the visualization editor, a Plotly toolbar appears where you can perform operations such as select, zoom, and pan.
If you hover over the top right of a chart in a notebook, a subset of tools appears:
Available in Databricks Runtime 9.1 LTS and above.
Data profiles display summary statistics of an Apache Spark DataFrame, a pandas DataFrame, or a SQL table in tabular and graphic format. To create a data profile from a results cell, click + and select .
Azure Databricks calculates and displays the summary statistics.
- Numeric and categorical features are shown in separate tables.
- At the top of the tab, you can sort or search for features.
- At the top of the chart column, you can choose to display a histogram (Standard) or quantiles.
- Check expand to enlarge the charts.
- Check log to display the charts on a log scale.
- You can hover your cursor over the charts for more detailed information, such as the boundaries of a histogram column and the number of rows in it, or the quantile value.
You can also generate data profiles programmatically; see summarize command (dbutils.data.summarize).
Work with visualizations and data profiles
Data profiles are available in Databricks Runtime 9.1 LTS and above.
In this topic:
- Rename, duplicate, or remove a visualization or data profile
- Edit a visualization
- Download a visualization
- Add a visualization or data profile to a dashboard
Rename, duplicate, or remove a visualization or data profile
To rename, duplicate, or remove a visualization or data profile, click the three vertical dots at the right of the tab name.
You can also change the name by clicking directly on it and editing the name in place.
Edit a visualization
Click beneath the visualization to open the visualization editor. When you have finished making changes, click Save.
You can customize a visualization’s colors when you create the visualization or by editing it.
- Create or edit a visualization.
- Click Colors.
- To modify a color, click the square and select the new color by doing one of the following:
- Click it in the color selector.
- Enter a hex value.
- Click anywhere outside the color selector to close it and save changes.
Temporarily hide or show a series
To hide a series in a visualization, click the series in the legend. To show the series again, click it again in the legend.
To show only a single series, double-click the series in the legend. To show other series, click each one.
Download a visualization
To download a visualization in .png format, click the camera icon in the notebook cell or in the visualization editor.
In a notebook cell, the camera icon appears at the upper right when you move the cursor over the cell.
In the visualization editor, the camera icon appears when you move the cursor over the chart. See Visualization tools.
Add a visualization or data profile to a dashboard
Click the three vertical dots at the right of the tab name.
Select Add to dashboard. A list of available dashboard views appears, along with a menu option Add to new dashboard.
Select a dashboard or select Add to new dashboard. The dashboard appears, including the newly added visualization or data profile.
Submit and view feedback for