nerdexam
Microsoft

DP-500 · Question #119

You have an Azure Synapse Analytics notebook. You run the %%sql magic command to render data into an Apache Spark DataFrame named df1, and then you run the following code. display(df1, summary =…

The correct answer is A. type C. missing D. unique. The display command with summary = true in Azure Synapse Analytics notebooks returns key data profiling attributes such as column data type, missing value counts, and unique value counts.

Explore and visualize data

Question

You have an Azure Synapse Analytics notebook. You run the %%sql magic command to render data into an Apache Spark DataFrame named df1, and then you run the following code. display(df1, summary = true) Which three attributes will be returned by the command? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

Options

  • Atype
  • Brange
  • Cmissing
  • Dunique
  • Eordinal

How the community answered

(48 responses)
  • A
    94% (45)
  • B
    2% (1)
  • E
    4% (2)

Why each option

The `display` command with `summary = true` in Azure Synapse Analytics notebooks returns key data profiling attributes such as column data type, missing value counts, and unique value counts.

AtypeCorrect

The `display(df1, summary=true)` command provides a data profile that includes the detected `type` (data type) for each column in the DataFrame, which is crucial for understanding the data structure.

Brange

While statistical summaries often include minimum and maximum values for numerical columns, 'range' is not presented as a direct, labeled attribute name in the `display(..., summary=true)` output, unlike 'type', 'missing', or 'unique'.

CmissingCorrect

The summary output includes statistics on `missing` values, showing both the count and percentage of nulls for each column, which helps in assessing data quality and completeness.

DuniqueCorrect

The `unique` attribute is returned in the summary, indicating the number and percentage of distinct values for each column, aiding in cardinality analysis and identifying potential keys.

Eordinal

'Ordinal' refers to a type of categorical data with a meaningful order; it is not a statistical attribute generated by the `display(..., summary=true)` command for data profiling.

Concept tested: Apache Spark DataFrame data profiling in Synapse notebooks

Source: https://learn.microsoft.com/en-us/azure/databricks/notebooks/display-functions

Topics

#Azure Synapse Analytics#Spark DataFrame#display command#Data profiling

Community Discussion

No community discussion yet for this question.

Full DP-500 Practice