DataFrame: Creation and Attributes Class 12 PYQs 2024–2026 with Solutions | CBSE Informatics Practices Skip to content
Smart Notes for Every Exam · instant PDF download after payment +91 92520 37565
Class 12 · Informatics Practices · Chapter 2

DataFrame: Creation and Attributes: Class 12 PYQs 2024–2026 with solutions

All 9 CBSE board questions asked from DataFrame: Creation and Attributes in 3 board papers, with the year, set and marks of each. 6 are solved free below. The Class 12 Informatics Practices PYQ Book: Solved Board Papers 2024-2026 (CBSE) has every solution, all chapters and 3 full board papers.

Cover of Class 12 Informatics Practices PYQ Book: Solved Board Papers 2024-2026 (CBSE)
Class 12 Informatics Practices PYQ book: every chapter + 3 board papers, all solved
US$1.99US$1.9934% off
Free sample

DataFrame: Creation and Attributes: board weightage

Board weightage 2024–2026

Year202420252026
Questions342
Marks684

Most asked topics

Creating a DataFrame4
DataFrame basics3
Series vs DataFrame2

9 questions from 3 papers. Repeated questions are shown once with every year they were asked.

Jump to: 1 mark2 marks3 marks

1 mark: MCQ and Assertion–Reason

Q1 · CBSE 2026 · 90 · Q201 mark

A–R. (A): A DataFrame can store values of multiple data types in multiple columns. (R): DataFrames are implemented using 2D arrays, which allow only numeric values.

Solution

(C) A is true; R is false (columns can hold strings, floats, ints…).

Q2 · CBSE 2025 · 90 · Q11 mark

True or False: In Python, we cannot create an empty DataFrame.

Solution

False. df = pd.DataFrame() creates an empty DataFrame (df.empty → True).

Q3 · CBSE 2024 · 90 · Q181 mark

A–R. (A): A Series is a one dimensional array and a DataFrame is a two-dimensional array containing a sequence of values of any data type. (R): Both Series and DataFrames have by default numeric indexes starting from zero.

Full step-by-step solution is in the PYQ book (US$1.99).

2 marks: very short answer

Q4 · CBSE 2025 · 90 · Q22(A)2 marks

(a) Two differences between Series and DataFrame.

Solution

Series is one-dimensional, DataFrame two-dimensional; a Series stores a single column, a DataFrame many columns (also: Series is homogeneous, DataFrame heterogeneous; Series size immutable, DataFrame size mutable).

Q5 · CBSE 2025 · 90 · Q28(B)2 marks

(b) Complete the code to print COLOUR, NAME, QTY rows Red Apple 10, Blue Berry 15, Green Guava 20: import ____ as pd / data=[{…},{…},{____, 'NAME':'Guava','QTY':20}] / df=pd.DataFrame(____) / print(____)

Solution

import pandas as pd
data = [{'COLOUR':'Red', 'NAME':'Apple', 'QTY':10},
{'COLOUR':'Blue', 'NAME':'Berry', 'QTY':15},
{'COLOUR':'Green', 'NAME':'Guava', 'QTY':20}]
df = pd.DataFrame(data)
print(df)

Q6 · CBSE 2024 · 90 · Q242 marks

Complete the code (S1 names with index 10, 16, 18; S2 subjects; S3 marks) to print Name/Subject/Marks rows 10 Rubina IP 56, 16 Jaya HSc 67, 18 Vaibhav IP 86.

Full step-by-step solution is in the PYQ book (US$1.99).

3 marks: short answer

Q7 · CBSE 2026 · 90 · Q36(I)3 marks

36(I) Create the DataFrame Scholarship (Name: Ananya, Karan, Simran, Rahul, Priya; Course: B.Sc., B.Tech, MCA, BCA, BA; Amount: 62000, 67000, 64000, 70000, 69000) using the dictionary of Series method.

Solution

import pandas as pd
name = pd.Series(["Ananya","Karan","Simran","Rahul","Priya"])
course = pd.Series(["B.Sc.","B.Tech","MCA","BCA","BA"])
amount = pd.Series([62000, 67000, 64000, 70000, 69000])
Scholarship = pd.DataFrame({"Name":name, "Course":course,
"Amount":amount})
print(Scholarship)
(Parts II and III, renaming the index and removing the last row, are in Chapter 3.)

Q8 · CBSE 2025 · 90 · Q30(A)3 marks

(a) Create, using a dictionary of Series, the DataFrame with City (Mumbai, Dehradun, Bengaluru, Hyderabad) and State (Maharashtra, Uttarakhand, Karnataka, Telangana).

Solution

import pandas as pd
d = {'City': pd.Series(['Mumbai','Dehradun','Bengaluru','Hyderabad']),
'State': pd.Series(['Maharashtra','Uttarakhand','Karnataka','Telangana'])}
df = pd.DataFrame(d)
print(df)

        City        State
0 Mumbai Maharashtra
1 Dehradun Uttarakhand
2 Bengaluru Karnataka
3 Hyderabad Telangana

Q9 · CBSE 2024 · 90 · Q273 marks

Kabir stores voters' name and age; create a list of dictionaries and a DataFrame with row labels Ar1001, Ba3002, Go4002, Dh4007, Na6005 (Arjun 35, Bala 23, Govind 25, Dhruv 19, Navya 18).

Full step-by-step solution is in the PYQ book (US$1.99).

Get every solution for all chapters

  • Every board question of every chapter, each fully solved the way the board gives marks
  • 3 complete board papers, each followed by its solutions
  • Weightage and most-asked topics for every chapter
  • Instant PDF download, colour and black & white print copies
See real pages (free sample)

Revising the chapter first? Complete Informatics Practices Notes for Class 12 (CBSE 065, 2026-27) →

What you get in the pack

All chapters in this pack

  1. PYQ Ch 1 Pandas Series
  2. PYQ Ch 2 DataFrame: Creation and Attributes
  3. PYQ Ch 3 DataFrame Operations and CSV Files
  4. PYQ Ch 4 Data Visualisation with Matplotlib
  5. PYQ Ch 5 SQL Revision and Single-row Functions
  6. PYQ Ch 6 SQL Aggregates, Grouping and Joins
  7. PYQ Ch 7 Computer Networks
  8. PYQ Ch 8 Introduction to the Internet and Web
  9. PYQ Ch 9 Societal Impacts
  10. Board Paper 2026 Set 90 with Solutions
  11. Board Paper 2025 Set 90 with Solutions
  12. Board Paper 2024 Set 90 with Solutions
← PYQ Ch 1 Pandas Series PYQ Ch 3 DataFrame Operations and CSV Files →

Prices shown in US dollars. Show prices in: ₹ INR · US$ USD