CBSE Class 12 Informatics Practices Question 9 of 44

Solved 2025 Sample Question Paper CBSE Class 12 Informatics Practices (065) — Question 9

Back to all questions
9
Question

Question 9

Which of the following Python statements is used to import data from a CSV file into a Pandas DataFrame (Note: pd is an alias for pandas)?

  1. pd.open_csv('filename.csv')
  2. pd.read_csv('filename.csv')
  3. pd.load_csv('filename.csv')
  4. pd.import_csv('filename.csv')
Answer

pd.read_csv('filename.csv')

Reason — The statement pd.read_csv('filename.csv') is used to import data from a CSV file into a Pandas DataFrame. The read_csv function reads the contents of the specified CSV file and converts it into a structured DataFrame format.