CBSE Class 12 Informatics Practices Question 26 of 70

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

Back to all questions
7
Question

Question 7

To read specific number of rows from a CSV file, which argument is to be given in read_csv() ?

  1. rows = <n>
  2. nrows = <n>
  3. n_rows = <n>
  4. number_rows = <n>
Answer

nrows = <n>

Reason — The argument nrows = <n> is to be given in read_csv() to read the specified number of rows from the CSV file.