CBSE Class 12 Informatics Practices Question 59 of 167

Python Pandas — I — Question 24

Back to all questions
24
Question

Question 24

Which of the following can be used to specify the data while creating a DataFrame ?

  1. Series
  2. List of Dictionaries
  3. Structured ndarray
  4. All of these
Answer

All of these

Reason — We can create a DataFrame object by passing data in many different ways, such as two-dimensional dictionaries (i.e., dictionaries having lists or dictionaries or ndarrays or series objects etc), two-dimensional ndarrays, series type object and another DataFrame object.