CBSE Class 12 Informatics Practices Question 28 of 70

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

Back to all questions
9
Question

Question 9

To skip 1st, 3rd and 5th row of CSV file, which argument will you give in read_csv() ?

  1. skiprows = 1 | 13 | 5
  2. skiprows = [1, 5, 1]
  3. skiprows = [1, 3, 5]
  4. any of these
Answer

skiprows = [1, 3, 5]

Reason — The argument to skip 1st, 3rd and 5th row of CSV file in read_csv() is skiprows = [1, 3, 5].