Question:medium

Assertion (A): Pandas DataFrame can store values of multiple data types in multiple Columns.

Reason (R): DataFrames are implemented using 2D arrays, which allows only numeric values.

Show Hint

A DataFrame holds different data types in different columns, so the Assertion is true. The Reason wrongly says only numbers are allowed.
Updated On: Oct 20, 2026
  • Both (A) and (R) are True, and (R) correctly explains (A).
  • Both (A) and (R) are True, but (R) does not correctly explain (A).
  • (A) is True, but (R) is False.
  • (A) is False, but (R) is True.
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Test the Reason first:
The Reason says a DataFrame allows only numeric values. We know that a DataFrame can store names (text) next to marks (numbers).
So the Reason is False.

Step 2: Use this to cut the options:
Options (A) and (B) both say that R is True, so they are out.
Option (D) says R is True as well, so it is out too.
Only option (C) has R as False.

Step 3: Confirm the Assertion:
Take pd.DataFrame({'Name': ['Ria', 'Sam'], 'Marks': [90, 85]}). The Name column holds text and the Marks column holds integers.
This shows that A is True, and it fits option (C).

Final Answer:
A is True and R is False. The answer is option (C).
Was this answer helpful?
0