Which of the following are false about a DataFrame?
(A). It only allows homogeneous data.
(B). It does not allow missing values.
(C). It allows row and column indexing.
(D). It does not allow selection, deletion, addition, and renaming operations on rows and columns.
Which of the following are false about a DataFrame?
(A). It only allows homogeneous data.
(B). It does not allow missing values.
(C). It allows row and column indexing.
(D). It does not allow selection, deletion, addition, and renaming operations on rows and columns.
Solution
A pandas DataFrame is a two-dimensional labelled structure that can hold heterogeneous data, so (A) is false. It also supports missing values, stored as NaN, so (B) is false. It supports selection, deletion, addition and renaming of rows and columns, so (D) is false.
Statement (C) is true: a DataFrame has both a row index and column labels, so it allows row and column indexing. Hence only (A), (B) and (D) are false.
Option 2 and Option 3: both include (C), which is a true statement about DataFrames.
Option 4: it leaves out (A), but (A) is false because each column of a DataFrame can have a different data type.
Memory trick: a Series is 1-D and homogeneous, while a DataFrame is 2-D and can mix types across columns.
Related questions:
2026: 11 May Shift 2
2025: 15 May Shift 2
2026: 31 May Shift 1
2026: 23 May Shift 2