CBSE Class 12 Informatics Practices Question 58 of 167

Python Pandas — I — Question 23

Back to all questions
23
Question

Question 23

If a dataframe is created using a 2D dictionary, then the column labels are formed from ............... .

  1. dictionary's values
  2. inner dictionary's keys
  3. outer dictionary's keys
  4. none of these
Answer

outer dictionary's keys

Reason — When a DataFrame is created using a 2D dictionary, then the column labels are formed from keys of outer dictionaries.