CBSE Class 12 Informatics Practices Data Handling using Pandas Worksheet

Read and download free pdf of CBSE Class 12 Informatics Practices Data Handling using Pandas Worksheet. Students and teachers of Class 12 Informatics Practices can get free printable Worksheets for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas in PDF format prepared as per the latest syllabus and examination pattern in your schools. Class 12 students should practice questions and answers given here for Informatics Practices in Class 12 which will help them to improve your knowledge of all important chapters and its topics. Students should also download free pdf of Class 12 Informatics Practices Worksheets prepared by school teachers as per the latest NCERT, CBSE, KVS books and syllabus issued this academic year and solve important problems with solutions on daily basis to get more score in school exams and tests

Worksheet for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas

Class 12 Informatics Practices students should refer to the following printable worksheet in Pdf for Chapter 2 Data Handling using Pandas in Class 12. This test paper with questions and answers for Class 12 will be very useful for exams and help you to score good marks

Class 12 Informatics Practices Worksheet for Chapter 2 Data Handling using Pandas

QUESTION AND ANSWER SECTION

Question. What will be the output of following codeimport pandas as pd
s1=pd.Series([1,2,2,7,’Sachin’,77.5])
print(s1.head())
print(s1.head(3))
Answer:
0  1
1  2
2  2
3  7
4 Sachin
dtype: object
0  1
1  2
2  2
dtype: object

Question. Write a program to display only those values greater than 200 in the given Series “S1”
0 300
1 100
2 1200
3 1700
Answer:
import pandas as pd
S1 = pd.Series([300, 100, 1200, 1700])
print(S1[S1>200])

Question. In pandas, S is a series with the following result:
S=pd.Series([5,10,15,20,25])
The series object is automatically indexed as 0,1,2,3,4. Write a statement to
assign the series as a, b, c, d, e index explicitly.
Answer:
S=pd.Series([5,10,15,20,25],index=['a','b','c','d','e'])

Question. Name any two attributes of Series in Python
Answer: Two attributes of Series in Python are :
1. index
2. values

Question. Write the output of the following :
import numpy as num
import pandas as pd
arr=num.array([1,7,21])
S1 = pd.Series(arr)
print(S1)
Answer:
0   1
1   7
2   21
dtype: int32

Question. Which property of series return all the index value?
Answer: index property return all the index value

Question. Write the output of the following :
import pandas as pd
S1 = pd.Series(range(1,15,3), index=[x for x in "super"])
print(S1)
Answer:
s   1
u  4
p  7
e  10
r   13
dtype: int64

Question. Complete the code to get the required output :
import ______ as pd
________ = pd.Series([31, 28, 31], index = ["Jan", "Feb", "Mar"] )
print(S1["_______"])
OUTPUT :
28
Answer:
import pandas as pd
S1 = pd.Series([31,28,31], index = ["Jan","Feb","Mar"])
print(S1["Feb"])

Question. Write the output of the following code :
import pandas as pd
S1 = pd.Series([31, 28, 31, 30, 31], index = ["Jan", "Feb", "Mar", "Apr", "May"])
print("-----------")
print(S1[1:3])
print("-----------")
print(S1[:5])
print("-----------")
print(S1[3:3])
print("-----------")
print(S1["Jan":"May"])
Answer:
-----------
Feb 28
Mar 31
dtype: int64
-----------
Jan 31
Feb 28
Mar 31
Apr 30
May 31
dtype: int64
-----------
Series([ ], dtype: int64)
-----------
Jan 31
Feb 28
Mar 31
Apr 30
May 31
dtype: int64

 

DATA FRAMES

Question. What are the purpose of following statements-
1.df.columns
2. df.iloc[ : , :-5]
3. df[2:8]
4. df[ :]
5. df.iloc[ : -4 , : ]
Answer:
1. It displays the names of columns of the Dataframe.
2. It will display all columns except the last 5 columns.
3. It displays all columns with row index 2 to 7.
4. It will display entire dataframe with all rows and columns.
5. It will display all rows except the last 4 four rows

Question. What will be the output of df.iloc[3:7,3:6]?
Answer: It will display the rows with index 3 to 6 and columns with index 3 to 5 in a dataframe ‘df’.

Question. Write a python program to create a data frame with headings (CS and IP) from the list given below-
[[79,92][86,96],[85,91],[80,99]]
Answer:
l=[[10,20],[20,30],[30,40]]
df=pd.DataFrame(l,columns=['CS','IP'])
print(df)

Question. Write python statement to delete the 3rd and 5th rows from dataframe df.
Answer: df1=df.drop(index=[2,4],axis=0)
or
df1=df.drop([2,4])

 

MCQ QUESTIONS

Question. To display the 3rd, 4th and 5th columns from the 6th to 9th rows of a dataframe you can write
a. DF.loc[6:9, 3:5]
b. DF.loc[6:10, 3:6]
c. DF.iloc[6:10, 3:6]
d. DF.iloc[6:9, 3:5]
Answer: C

Question. We can add a new row to a DataFrame using the _____________ method
a. rloc[ ]
b. loc[ ]
c. iloc[ ]
d. None of the above
Answer: B

Question. The head() function of dataframe will display how may rows from top if no parameter is passed.
a. 1
b. 3
c. 5
d. None of these
Answer: C

Question. To change the 5th column's value at 3rd row as 35 in dataframe DF, you can write
a. DF[4, 6] = 35
b. DF.iat[4, 6] = 35
c. DF[3, 5] = 35
d. DF.iat[3, 5] = 35
Answer: D

Question. Which function is used to find values from a DataFrame D using the index number?
a. D.loc
b. D.iloc
c. D.index
d. None of these
Answer: B

Question. In a DataFrame, Axis= 0 represents the elements
a. rows
b.columns
c. both
d. None of these.
Answer: A

Question. In DataFrame, by default new column added as the _____________ column
a. First (Left Side)
b. Second
c.Last (Right Side)
d. Any where in dataframe
Answer: C

Question. Which of the following is correct Features of DataFrame?
a. Potentially columns are of different types
b. Can Perform Arithmetic operations on rows and columns
c. Labeled axes (rows and columns)
d. All of the above
Answer: D

Question. Write the code to append df2 with df1
a.Df2=Df2.append(Df1)
b. Df2=Df2+Df1
c. Df2=Df2.appendwith.Df1
d. Df2=Df1.append(Df1)
Answer: A

Question. When we create DataFrame from List of Dictionaries, then number of columns in DataFrame isequal to the _______
a. maximum number of keys in first dictionary of the list
b. maximum number of different keys in all dictionaries of the list
c. maximum number of dictionaries in the list
d. None of the above
Answer: B

Question. When we create DataFrame from List of Dictionaries, then dictionary keys will become ______
a. Column labels
b. Row labels
c. Both of the above
d. None of the above
Answer: A

Question. Which method is used to access vertical subset of a dataframe?
a. iterrows()
b. iteritems()
c. itercolumns()
d. itercols()
Answer: B

Question. Write statement to transpose dataframe DF.
a. DF.t
b. DF.transpose
c.DF.T
d.DF.T( )
Answer: C

Question. In DataFrame, by default new column added as the _____________ column
a. First (Left Side)
b. Second
c. Last (Right Side)
d. Any where in dataframe
Answer: C

Question. We can add a new row to a DataFrame using the _____________ method
a. rloc[ ]
b. loc[ ]
c. iloc[ ]
d. None of the above
Answer: B

Question. Which of the following function is used to load the data from the CSV file to DataFrame?
a. read.csv( )
b. readcsv( )
c. read_csv( )
d. Read_csv( )
Answer: C

Question. Which of the following function is not a Boolean reduction function
a. Empty
b. Any()
c. All()
d. Fillna()
Answer: D

Question. Which among the following options can be used to create a DataFrame in Pandas ?
a. A scalar value
b. An ndarray
c. A python dict
d. All of these
Answer: D

Question. Which attribute of a dataframe is used to convert row into columns and columns into rows in a dataframe?
a. T
b. ndim
c. empty
d. shape
Answer: A

Question. When we create DataFrame from List of Dictionaries, then number of columns in DataFrame is equal to the _______
a. maximum number of keys in first dictionary of the list
b. maximum number of different keys in all dictionaries of the list
c. maximum number of dictionaries in the list
d. None of the above
Answer: B

Question. Which of the following is/are characteristics of DataFrame?
a. Columns are of different types
b. Can Perform Arithmetic operations
c. Axes are labeled (rows and columns)
d. All of the above
Answer: D

Question. Write short code to show the information having city=”Delhi” from dataframe SHOP.
a. print(SHOP[City==’Delhi’])
b. print(SHOP[SHOP.City==’Delhi’])
c. print(SHOP[SHOP.’City’==’Delhi’])
d. print(SHOP[SHOP[City]==’Delhi’])
Answer: B

Question. Which of the following commands is used to install pandas?
a. pip install python –pandas
b. pip install pandas
c. python install python
d. python install pandas
Answer: B

Question. Assuming the given structure, which command will give us the given output:
Output Required: (3,4)
EmpCode Name Desig
0 1405 VINAY Clerk
1 1985 MANISH Works Manager
2 1636 SMINA Sales Manager
3 1689 RINU Cleark
a. print(df.shape())
b. print(df.shape)
c. print(df.size)
d. print(df.size()).
Answer: B

Question. Write the output of the given command: df1.loc[:0,'Name'] Consider the given dataframe.
EmpCode Name Desig
0 1405 VINAY Clerk
1 1985 MANISH Works Manager
2 1636 SMINA Sales Manager
3 1689 RINU Clerk
a. 0 1405 VINAY Clerk
b. VINAY
c. Works Manager
d. Clerk
Answer: B

Question. which one of these is not a valid line style in matplotlib
a. ‘-‘
b. ‘--‘
c. ‘-.’
d. ‘<’
Answer: D

Question. How can we make bar chart horizontal?
a. plt.bar()
b. plt.hbar()
c. plt.barh()
d. plt.rightbar()
Answer: C

Question. A histogram is used:
a. for continuous data
b. for grouped data
c. for time series data
d. to compare two sets of data
Answer: A

Question. Which function is used to show legend ?
a. display ( )
b. show( )
c. legend( )
d. legends( )
Answer: C

Question. The datapoints plotted on a graph are called _____________
a. Markers
b. Values
c. Ticks
d. Pointers
Answer: A 

Question. To specify the style of line as dashed , which argument of plot() needs to be set ?
a. line
b. width
c. Style
d. linestyle
Answer: D

Question. Which of the following is not a valid plotting function in pyplot?
a. bar()
b. hist()
c. histh()
d. barh()
Answer: C

Question. To get top 5 rows of a dataframe, you may use
a. head( )
b. head(5)
c. top( )
d. top(5)
Answer: A

Question. The correct statement to read from a CSV file in a dataframeis :
a. .read_csv()
b. . read_csv( )()
c. = pandas.read()
d. = pandas.read_csv()
Answer: D

Question. To delete a column from a dataframe, you may use ______ statement.
a. remove()
b. del()
c. drop()
d. cancel()
Answer: C

Question. To get top 5 rows of a dataframe, you may use
a. head( )
b. head(5)
c. top( )
d. top(5)
Answer: A

Question. To iterate over horizontal subsets of dataframe,
a. iterate( )
b. iterrows( ) function may be used.
c. itercols( )
d. iteritems( )
Answer: B

Question. Write code to delete the row whose index value is A1 from dataframe df.
a. df=df.drop(‘A1’)
b. df=df.drop(index=‘A1’)
c. df=df.drop(‘A1,axis=index’)
d. df=df.del(‘A1’)
Answer: A

Question. A two-dimension labelled array that is an ordered collection of columns to store heterogeneous datatype is
a. Series
b. Numpy array
c. Dataframe
d. Panel
Answer: C


Importing/Exporting Data between CSV files and Data Frames Basics of CSV Files

Question. Read the statements given below and identify the right option to draw a histogram.
Statement A: To make a Histogram with Matplotlib, we can use the plt.hist() function.
Statement B: The bin parameter is compulsory to create histogram.
a. Statement A is correct
b. Statement B is correct
c. Statement A is correct, but Statement B is incorrect
d. d. Statement A is incorrect, but Statement B is correct
Answer: D

Question. Which graph should be used where each column represents a range of values, and the height of a column corresponds to how many values are in that range?
a. plot
b. line
c. bar
d. histogram
Answer: D

Question. To give a title to x-axis, which of the following method is used?
a. plt.xtitle(“title”)
b. plt.xlabel(“title”)
c. plt.xheader(“title”)
d. plt.xlabel.show(“title”)
Answer: A

Question. To change the width of bars in bar chart, which of the following argument with a float value is used?
a. thick
b. thickness
c. width
d. barwidth
Answer: C

Question. What is the purpose of legend?
a. A legend is an area describing the elements of the graph.
b. A legend is top area with information about graph
c. A legend is additional information of x and y labels
d. A legend is a mini box with bars data
Answer: A

More Worksheets for Class 12 Informatics Practices
CBSE Class 12 Informatics Practices Commonly Used Libraries Worksheet
CBSE Class 12 Informatics Practices Computer Networking Worksheet
CBSE Class 12 Informatics Practices Computer Xml Extensible Markup Language Worksheet
CBSE Class 12 Informatics Practices Concept Of Inheritance Worksheet
CBSE Class 12 Informatics Practices Database Connectivity To MySQL Worksheet
CBSE Class 12 Informatics Practices Database Fundamentals MySQL Revision Tour Worksheet
CBSE Class 12 Informatics Practices Database Transactions Worksheet
CBSE Class 12 Informatics Practices File Handling Worksheet
CBSE Class 12 Informatics Practices Html Basic Html Elements Worksheet
CBSE Class 12 Informatics Practices Html Lists Tables And Forms Worksheet
CBSE Class 12 Informatics Practices Introducing Classes And Objects Worksheet
CBSE Class 12 Informatics Practices It Applications Worksheet
CBSE Class 12 Informatics Practices Java Application Worksheet
CBSE Class 12 Informatics Practices Java Gui Programming Revision Worksheet
CBSE Class 12 Informatics Practices Java Gui Programming Worksheet
CBSE Class 12 Informatics Practices More On Sql Grouping Records And Table Joins Worksheet
CBSE Class 12 Informatics Practices MySQL Worksheet
CBSE Class 12 Informatics Practices Networking Worksheet
CBSE Class 12 Informatics Practices Open Source Concepts Worksheet
CBSE Class 12 Informatics Practices Sure Shot Questions Worksheet
CBSE Class 12 Informatics Practices Sure Shot Questions Worksheet Set A
CBSE Class 12 Informatics Practices Table And Integrity Constraints Worksheet
CBSE Class 12 Informatics Practices Web Application Development Worksheet

More Study Material

CBSE Class 12 Informatics Practices Chapter 2 Data Handling using Pandas Worksheet

We hope students liked the above worksheet for Chapter 2 Data Handling using Pandas designed as per the latest syllabus for Class 12 Informatics Practices released by CBSE. Students of Class 12 should download in Pdf format and practice the questions and solutions given in the above worksheet for Class 12 Informatics Practices on a daily basis. All the latest worksheets with answers have been developed for Informatics Practices by referring to the most important and regularly asked topics that the students should learn and practice to get better scores in their class tests and examinations. Studiestoday is the best portal for Class 12 students to get all the latest study material free of cost.

Worksheet for Informatics Practices CBSE Class 12 Chapter 2 Data Handling using Pandas

Expert teachers of studiestoday have referred to the NCERT book for Class 12 Informatics Practices to develop the Informatics Practices Class 12 worksheet. If you download the practice worksheet for one chapter daily, you will get higher and better marks in Class 12 exams this year as you will have stronger concepts. Daily questions practice of Informatics Practices worksheet and its study material will help students to have a stronger understanding of all concepts and also make them experts on all scoring topics. You can easily download and save all revision worksheet for Class 12 Informatics Practices also from www.studiestoday.com without paying anything in Pdf format. After solving the questions given in the worksheet which have been developed as per the latest course books also refer to the NCERT solutions for Class 12 Informatics Practices designed by our teachers

Chapter 2 Data Handling using Pandas worksheet Informatics Practices CBSE Class 12

All worksheets given above for Class 12 Informatics Practices have been made as per the latest syllabus and books issued for the current academic year. The students of Class 12 can be rest assured that the answers have been also provided by our teachers for all worksheet of Informatics Practices so that you are able to solve the questions and then compare your answers with the solutions provided by us. We have also provided a lot of MCQ questions for Class 12 Informatics Practices in the worksheet so that you can solve questions relating to all topics given in each chapter. All study material for Class 12 Informatics Practices students have been given on studiestoday.

Chapter 2 Data Handling using Pandas CBSE Class 12 Informatics Practices Worksheet

Regular worksheet practice helps to gain more practice in solving questions to obtain a more comprehensive understanding of Chapter 2 Data Handling using Pandas concepts. Worksheets play an important role in developing an understanding of Chapter 2 Data Handling using Pandas in CBSE Class 12. Students can download and save or print all the worksheets, printable assignments, and practice sheets of the above chapter in Class 12 Informatics Practices in Pdf format from studiestoday. You can print or read them online on your computer or mobile or any other device. After solving these you should also refer to Class 12 Informatics Practices MCQ Test for the same chapter.

Worksheet for CBSE Informatics Practices Class 12 Chapter 2 Data Handling using Pandas

CBSE Class 12 Informatics Practices best textbooks have been used for writing the problems given in the above worksheet. If you have tests coming up then you should revise all concepts relating to Chapter 2 Data Handling using Pandas and then take out a print of the above worksheet and attempt all problems. We have also provided a lot of other Worksheets for Class 12 Informatics Practices which you can use to further make yourself better in Informatics Practices

Where can I download latest CBSE Printable worksheets for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas

You can download the CBSE Printable worksheets for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas for latest session from StudiesToday.com

Can I download the Printable worksheets of Chapter 2 Data Handling using Pandas Class 12 Informatics Practices in Pdf

Yes, you can click on the links above and download Printable worksheets in PDFs for Chapter 2 Data Handling using Pandas Class 12 for Informatics Practices

Are the Class 12 Informatics Practices Chapter 2 Data Handling using Pandas Printable worksheets available for the latest session

Yes, the Printable worksheets issued for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas have been made available here for latest academic session

How can I download the Class 12 Informatics Practices Chapter 2 Data Handling using Pandas Printable worksheets

You can easily access the links above and download the Class 12 Printable worksheets Informatics Practices Chapter 2 Data Handling using Pandas for each chapter

Is there any charge for the Printable worksheets for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas

There is no charge for the Printable worksheets for Class 12 CBSE Informatics Practices Chapter 2 Data Handling using Pandas you can download everything free

How can I improve my scores by solving questions given in Printable worksheets in Class 12 Informatics Practices Chapter 2 Data Handling using Pandas

Regular revision of practice worksheets given on studiestoday for Class 12 subject Informatics Practices Chapter 2 Data Handling using Pandas can help you to score better marks in exams

Are there any websites that offer free test sheets for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas

Yes, studiestoday.com provides all latest NCERT Chapter 2 Data Handling using Pandas Class 12 Informatics Practices test sheets with answers based on the latest books for the current academic session

Can test papers for Class 12 Informatics Practices Chapter 2 Data Handling using Pandas be accessed on mobile devices

Yes, studiestoday provides worksheets in Pdf for Chapter 2 Data Handling using Pandas Class 12 Informatics Practices in mobile-friendly format and can be accessed on smartphones and tablets.

Are worksheets for Chapter 2 Data Handling using Pandas Class 12 Informatics Practices available in multiple languages

Yes, worksheets for Chapter 2 Data Handling using Pandas Class 12 Informatics Practices are available in multiple languages, including English, Hindi