CBSE Class 12 Informatics Practices Question 23 of 70

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

Back to all questions
4
Question

Question 4

The correct statement to read from a CSV file in a DataFrame is :

  1. <DF>.read_csv(<file>)
  2. <File>. read_csv( )(<DF>)
  3. <DF> = pandas.read(<file>)
  4. <DF> = pandas.read_csv(<files>)
Answer

<DF> = pandas.read_csv(<files>)

Reason — The statement to read data from a CSV file into a DataFrame is <DF> = pandas.read_csv(<filepath>).