Chapter 2 · Section 5 practice
Interactive Visualisation
These questions review the examples in the companion slides. Choose an answer, then check the explanation.
Question 1
In px.scatter(df, x="teaching", y="citations"), what do x and y name?
- DataFrame columns
- Row positions
- Python package names
- Two output files
Question 2
What should be checked before plotting a numeric column?
- Only the chart colour
- Whether its name is short
- Whether every value is positive
- Its meaning, numeric type, missing values and selected rows
Question 3
Which statement about Express and Graph Objects is correct?
- Graph Objects fills missing data automatically
- Express figures cannot be updated
- Express produces figures that Graph Objects methods can refine
- Express can draw only histograms
Question 4
What makes animated points comparable across years?
- Removing the year column
- Stable observation identities and fixed axis ranges
- Random colours in each frame
- Different scales in each frame
Question 5
How does add_trace place a trace in the second panel of one row?
add_trace(trace, row=1, col=2)add_trace(trace, row=0, col=1)set_index(2)update_layout(axis=2)
Question 6
A chart displays missing-feature counts by month. What should its caption state?
- A guaranteed profitable strategy
- Only the colour scheme
- That plotting proves data completeness
- The sample, count definition and limitation