Data Analysis Fundamentals · Practice set 4 of 6
Labeled Data Structures: 10 practice questions
10 free Data Analysis Fundamentals practice questions on Labeled Data Structures, with an explanation for every answer. Untimed. The full mock exam and the timed version are in the app.
-
Question 1 of 10
Which pandas structure represents a one-dimensional labeled collection that can hold any data type?
- AA Series with an index
- BA label-free NumPy matrix
- CA dictionary without values
- DA DataFrame with two axes
Show the answer
A Series pairs one-dimensional values with index labels; a DataFrame is two-dimensional and the other choices do not describe the pandas object.
Next → 1 / 10 -
Question 2 of 10
Which object has labeled rows and columns whose columns may use different dtypes?
- AA pandas DataFrame
- BAn unlabeled Python tuple
- CA single NumPy dtype
- DA pandas scalar
Show the answer
A DataFrame is a two-dimensional labeled structure and supports a separate dtype for each column.
Next → 2 / 10 -
Question 3 of 10
Which attribute reports the axis dimensions of a pandas object?
- A`shape`
- B`array`
- C`dtype`
- D`columns`
Show the answer
`shape` reports dimensions; labels, dtypes, and backing arrays are inspected through different attributes.
Next → 3 / 10 -
Question 4 of 10
What happens when a scalar is passed as Series data with an explicit five-label index?
- AOnly the first label receives the scalar
- BFive unlabeled DataFrame columns are created
- CThe scalar is repeated across the five labels
- DThe labels are discarded and one row remains
Show the answer
Scalar Series construction broadcasts the value to the required index length while preserving the supplied labels.
Next → 4 / 10 -
Question 5 of 10
How does a DataFrame constructor combine a dictionary of Series with different indexes?
- AIt combines values strictly by their current positions
- BIt discards every label absent from the first Series
- CIt aligns by labels and uses the union of indexes
- DIt requires all Series labels to be identical first
Show the answer
Dictionary-of-Series construction uses label alignment, retaining the union and marking absent values as missing.
Next → 5 / 10 -
Keep the ones you got wrong
In the app, every question you miss comes back exactly when you’re about to forget it.
-
Question 6 of 10
What structural information is omitted by `DataFrame.to_numpy()`?
- AThe common NumPy dtype
- BThe row and column labels
- CThe number of array dimensions
- DEvery numeric cell value
Show the answer
The conversion retains values in a NumPy array but intentionally removes both labeled axes.
Next → 6 / 10 -
Question 7 of 10
What index does an operation between differently indexed Series produce?
- AThe union of both Series indexes
- BA fresh range index of the shorter Series
- CThe left Series positions without labels
- DThe intersection with missing labels removed
Show the answer
Series arithmetic aligns labels and keeps the union, with missing results where an operand lacks a label.
Next → 7 / 10 -
Question 8 of 10
An analyst has two named variable lists, but one has four values and the other has five. The result must be a five-row DataFrame with explicit row labels and no invented observation. What should happen before construction?
- AConstruct immediately and let pandas silently repeat the shorter list
- BDrop both variable names and combine the lists by position
- CResolve the unequal column lengths, then supply five row labels
- DSupply four row labels and let pandas truncate the longer list
Show the answer
Dictionary-of-array construction requires equal column lengths, and an explicit index must match that resolved length.
Next → 8 / 10 -
Question 9 of 10
A mixed-type DataFrame has meaningful row and column labels. A NumPy-only function needs an ndarray, but the analyst must first document the table schema and avoid assuming the conversion is free. Which workflow fits?
- ARead only `shape`, then assume the ndarray will preserve both labeled axes
- BCall `to_numpy()` first and treat its common dtype as proof that every source column matched
- CInspect labels, shape, and dtypes, then call `to_numpy()` and allow for coercion or copying
- DUse `columns` as the numeric array because it retains heterogeneous cell values
Show the answer
Structural inspection preserves the schema record before conversion, while `to_numpy()` can coerce mixed columns and omit labels.
Next → 9 / 10 -
Question 10 of 10
Two Series contain measurements for labels `a,b,c` and `b,c,d`. The calculation must preserve every observed label and must not pair values merely because they occupy the same position. Which result behavior is required?
- APair first with first, retain three positions, and discard all labels
- BRepeat endpoint values so all four labels have two numeric operands
- CKeep only `b,c` because every result must have two present operands
- DAlign by label, retain `a,b,c,d`, and mark unmatched operands missing
Show the answer
Series alignment uses the union to avoid label loss and represents an absent operand as missing.
Next → 10 / 10 -
You’ve finished this set
That’s 10 questions on Labeled Data Structures. 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.