HOTSPOT
You load data from a notebook in an Azure Machine Learning workspace into a pandas dataframe. The data contains 10,000 records. Each record consists of 10 columns.
You must identify the number of missing values in each of the columns.
You need to complete the Python code that will return the number of missing values in each of the columns.
Which code segments should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.


Show answer and explanation

Explanation:
Box 1: values
pandas.DataFrame.values
property DataFrame.values[source]
Return a Numpy representation of the DataFrame.
Warning
We recommend using DataFrame.to_numpy() instead.
Only the values in the DataFrame will be returned, the axes labels will be removed.
Incorrect:
* index
pandas.DataFrame.index
DataFrame.index
The index (row labels) of the DataFrame.
* shape
pandas.DataFrame.shape
property DataFrame.shape[source]
Return a tuple representing the dimensionality of the DataFrame.
See also
ndarray.shape
Tuple of array dimensions.
Box 2: 10
pandas.DataFrame.count
DataFrame.count(axis=0, numeric_only=False)[source]
Count non-NA cells for each column or row.
The values None, NaN, NaT, and optionally numpy.inf (depending on pandas.options.mode.use_inf_as_na) are considered NA.
References:
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.values.html











