Prepstellar

Data Analysis Fundamentals · Practice set 5 of 6

Initial Data Inspection: 10 practice questions

10 questions · Untimed · Free

10 free Data Analysis Fundamentals practice questions on Initial Data Inspection, with an explanation for every answer. Untimed. The full mock exam and the timed version are in the app.

Set 5 · Initial Data Inspection · 10 questions Read the lesson
  1. Question 1 of 10

    Which method previews the final observations of a DataFrame?

    1. A`tail()`
    2. B`head()`
    3. C`describe()`
    4. D`sort_index()`
    Show the answer

    `tail()` provides a bounded view of the ending observations; the neighboring methods preview the start, summarize, or sort.

    Next → 1 / 10
  2. Question 2 of 10

    Which statistic is included in the default numeric output from `describe()`?

    1. AThe memory use of each column
    2. BThe sample standard deviation
    3. CThe full ordered list of values
    4. DThe most recent row label
    Show the answer

    Numeric `describe()` reports count, center, spread, quartiles, and extrema; it is not a row, value-list, or memory report.

    Next → 2 / 10
  3. Question 3 of 10

    Which method sorts a DataFrame by its row index labels by default?

    1. A`tail()`
    2. B`describe()`
    3. C`sort_values()`
    4. D`sort_index()`
    Show the answer

    `sort_index()` orders index labels; value sorting, statistical summary, and boundary preview serve different purposes.

    Next → 3 / 10
  4. Question 4 of 10

    What does `describe()` report for a nonnumeric Series?

    1. ARow labels, column labels, shape, and memory
    2. BDelimiter, encoding, quoting, and header location
    3. CMean, variance, skewness, and cumulative sum
    4. DCount, unique count, top value, and its frequency
    Show the answer

    The nonnumeric summary focuses on presence, cardinality, and the most frequent value rather than numeric moments or metadata.

    Next → 4 / 10
  5. Question 5 of 10

    How can an analyst request both numeric and nonnumeric summaries from a mixed DataFrame?

    1. ACall `sort_values(include="all")`
    2. BCall `describe()` with no arguments
    3. CCall `head(include="all")`
    4. DCall `describe(include="all")`
    Show the answer

    Mixed DataFrames default to numeric summaries, while the `all` inclusion setting expands the dtype scope.

    Next → 5 / 10
  6. Keep the ones you got wrong

    In the app, every question you miss comes back exactly when you’re about to forget it.

  7. Question 6 of 10

    How does `sort_values()` place missing values unless configured otherwise?

    1. AIn a separate returned DataFrame
    2. BAt their original unsorted positions
    3. CBefore every nonmissing value
    4. DAfter the nonmissing values
    Show the answer

    Missing values sort last by default; `na_position="first"` changes that placement within the same result.

    Next → 6 / 10
  8. Question 7 of 10

    What must a sorting `key` callable return?

    1. AA DataFrame with an additional comparison column
    2. BA scalar containing the first sorted value
    3. CA list containing fewer values than the sort column
    4. DA Series or array with the same shape as its input
    Show the answer

    The key supplies transformed comparison values while preserving one comparison result for each original value.

    Next → 7 / 10
  9. Question 8 of 10

    A ten-million-row import may contain a malformed header near the start and a footer-like record at the end. The analyst must inspect both boundaries without rendering the full table. Which action fits?

    1. AUse `head(n)` and `tail(n)` with small explicit counts
    2. BRender the entire DataFrame and scroll between both boundaries
    3. CSort every value and assume the original boundaries remain visible
    4. DUse only `describe()` because it returns the first and last records
    Show the answer

    Small first-and-last previews directly inspect both required boundaries while keeping output bounded.

    Next → 8 / 10
  10. Question 9 of 10

    A mixed DataFrame has numeric amounts and text statuses. The report must summarize both families, exclude missing values as documented, and retain the median in the numeric output. Which inspection is appropriate?

    1. AUse plain `describe()` and assume text status frequencies are included
    2. BUse `head()` and treat the preview as complete descriptive statistics
    3. CUse `describe(include="all")` and interpret count as nonmissing observations
    4. DUse `sort_index()` and interpret label order as variable distribution
    Show the answer

    The `all` scope includes both dtype families, while `describe()` excludes missing observations and keeps the median.

    Next → 9 / 10
  11. Question 10 of 10

    A review must order rows first by `team` and then by `score`, compare team names without case sensitivity, and place missing sort values first. Which configuration meets all constraints?

    1. AUse `sort_index(axis=1)` and leave missing values in the default position
    2. BUse `head()` on each team and concatenate rows in their source order
    3. CUse `sort_values(by=["team","score"], key=casefolding_callable, na_position="first")`
    4. DUse `sort_values(by="score")` without a key and then rename the index
    Show the answer

    Multiple `by` keys establish precedence, the callable transforms comparisons, and `na_position` controls missing placement.

    Next → 10 / 10
  12. You’ve finished this set

    That’s 10 questions on Initial Data Inspection. In the app the ones you miss come back exactly when you’re about to forget them.

The whole course, on your phone

Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.