nerdexam
Microsoft

DP-500 · Question #103

Hotspot Question You are using an Azure Synapse notebook to create a Python visual. You run the following code cell to import a dataset named iris. iris = sns.load_dataset("iris") iris.head() A…

This question tests your ability to use the Seaborn library in an Azure Synapse notebook to create a specific visualization from the classic iris dataset, requiring you to select the correct plot type and parameter configuration.

Explore and visualize data

Question

Hotspot Question You are using an Azure Synapse notebook to create a Python visual. You run the following code cell to import a dataset named iris. iris = sns.load_dataset("iris") iris.head() A sample of the data is shown in the following table. You need to create the visual shown in the exhibit. How should you complete the Python code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation

This question tests your ability to use the Seaborn library in an Azure Synapse notebook to create a specific visualization from the classic iris dataset, requiring you to select the correct plot type and parameter configuration.

Approach. The iris dataset contains columns: sepal_length, sepal_width, petal_length, petal_width, and species. Based on typical exam exhibits for this scenario, the visual is a pairplot (also called a scatterplot matrix), which is created using sns.pairplot(iris, hue='species'). The hue='species' parameter color-codes each data point by flower species (setosa, versicolor, virginica), allowing you to see cluster separation across all numeric feature combinations. You would then call plt.show() to render the plot in the notebook output cell.

Concept tested. Using Seaborn's pairplot (or potentially scatterplot/boxplot) function with the hue parameter to differentiate categorical groups in a multivariate visualization within Azure Synapse Analytics notebooks.

Reference. Microsoft Learn: Visualize data in Azure Synapse Analytics / Seaborn documentation: https://seaborn.pydata.org/generated/seaborn.pairplot.html

Topics

#Azure Synapse Analytics#Python#Data Visualization#Seaborn

Community Discussion

No community discussion yet for this question.

Full DP-500 Practice