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.
Opens in your browser. Nothing to install.
Start studying -
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
Series `x` and `y` are numeric and have different, unique index labels. Which index does `x + y` produce?
- AA fresh range index of the shorter Series
- BThe intersection with missing labels removed
- CThe union of both Series indexes
- DThe left Series positions without labels
Show the answer
Arithmetic aligns the two Series by label and keeps the union, with a missing result wherever an operand has no value for that 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
Series `x` holds 10, 20 and 30 at labels `a`, `b` and `c`. Series `y` holds 1, 2 and 3 at labels `b`, `c` and `d`. What does `x + y` hold at `a`, `b`, `c` and `d`?
- A10, 21, 32, 3
- BMissing, 12, 23, missing
- CMissing, 21, 32, missing
- D11, 22, 33, missing
Show the answer
Alignment pairs `b` with `b` and `c` with `c`, so 20+1 gives 21 and 30+2 gives 32. The union keeps `a` and `d`, and each is missing because only one operand supplies a value there.
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.
Back to the course Next lesson: Initial Data InspectionOpens in your browser. Nothing to install.
Start studying
The whole course, on your computer and your phone
Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.
Opens in your browser. Nothing to install.
Start studying“This app is the ‘One Lake’ for preparing the certification exams. Really worth it.”
