CBSE Class 12 Informatics Practices Question 2 of 70

Importing/Exporting Data between CSV Files/MySQL and Pandas — Question 2

Back to all questions
2
Question

Question 2

Assertion. The read_csv() function of Python Pandas can read data of a csv file into any of pandas data structures.

Reason. DataFrame is a compatible data structure for read_csv() function.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

A is false but R is true.

Explanation
The read_csv() function of Python Pandas can only read data from a CSV file into the DataFrame data structure of Pandas. DataFrame is a compatible data structure for the read_csv() function, as it is the primary data structure designed to be created by read_csv().