CBSE Class 12 Informatics Practices Question 56 of 167

Python Pandas — I — Question 21

Back to all questions
21
Question

Question 21

When we create a DataFrame from a list of Dictionaries the columns labels are formed by the :

  1. Union of the keys of the dictionaries
  2. Intersection of the keys of the dictionaries
  3. Union of the values of the dictionaries
  4. Intersection of the values of the dictionaries
Answer

Union of the keys of the dictionaries

Reason — When we create a DataFrame from a list of dictionaries, the column labels are formed by the union of the keys of the dictionaries.