Section A
Question 1. Arithmetic operations are possible on a dataframe’s
(a) rows
(b) columns
(c) Both (a) and (b)
(d) Arithmetic operations are not possible
Answer
C
Question 2. In a dataframe, columns can store
(a) same type of data
(b) different types of data
(c) only integers
(d) None of the above
Answer
B
Question 3. The indexes of a series can be seen by the property
(a) indexes
(b) index
(c) values
(d) indices
Answer
B
Question 4. While slicing a series, if user specifies an index that is more than the last index
(a) no error will occur
(b) python will give an index error
(c) abnormal output will be produced
(d) only the element at the last index will be returned
Answer
A
Question 5. Which of the following method(s) is/are not available for a series?
(a) Head()
(b) Tail()
(c) iloc()
(d) Both (a) and (b)
Answer
D
Question 6. Ahitagni was confused whether a dataframe has integer indexes for rows or columns or both. Columns in a dataframe have by default indexes
(a) starting from ‘a’
(b) starting from 1
(c) starting from 0
(d) starting from 2
Answer
C
Question 7. Simran wanted to see the number of bytes occupied by her series “mseries”, the command she should write is
(a) mseries.bytes
(b) mseries.size
(c) mseries.nbytes
(d) mseries.ndim
Answer
C
Question 8. The ………………. function displays a grid in the chart wall.
(a) datagrid()
(b) grid()
(c) chartgrid()
(d) pattern()
Answer
B
Question 9. To plot two lines in two different views of the same window, the function used is
(a) Plot()
(b) plot()
(c) subplot()
(d) plotviews()
Answer
C
Question 10. Charts cannot be shown
(a) without data
(b) without legends
(c) without title
(d) without axis labels
Answer
A
Question 11. Which of the following is not true about a freeware?
(a) Available free of cost
(b) Can be modified
(c) Can be copied
(d) Can be redistributed
Question 12. W3C stands for
(a) World Wide Web
(b) World Web Concerns
(c) World Wide Web Consortium
(d) World Wide Web Concerts
Answer
C
Question 13. Which of the following is/are not open source software(s)?
(a) Mozilla Firefox
(b) Adobe Photoshop
(c) MS-Windows
(d) Both (b) and (c)
Answer
D
Question 14. The drop() function can remove from a dataframe
(a) rows
(b) columns
(c) Both (a) and (b)
(d) drop() function is not available for dataframes
Answer
C
Question 15. Practice of obtaining contribution from online community is called
(a) communitysourcing
(b) multisourcing
(c) crowdsourcing
(d) crowdgathering
Answer
C
Question 16. Free softwares allow
(a) free usage
(b) modification
(c) copying
(d) All of these
Answer
D
Question 17. If two dataframes containing numeric values are added, the resultant dataframe will have
(a) corresponding elements joined
(b) corresponding elements added
(c) dataframes cannot be added
(d) None of these
Answer
B
Question 18. The least restrictive open source license is
(a) GNU
(b) Apache
(c) CC
(d) MIT
Answer
D
Question 19. Which of the following attribute(s) is/are not available with the read_csv() function,while reading a CSV file?
(a) names
(b) skiprows
(c) heading
(d) nrows
Answer
C
Question 20. Theft of personal digital information in order to commit crime is called
(a) data theft
(b) identity theft
(c) mail theft
(d) personal theft
Answer
B
Question 21. The original code written by programmers for a software is called
(a) program code
(b) object code
(c) source code
(d) original code
Answer
C
Question 22. In a URL, https:// means
(a) the site is simple
(b) the website is secured
(c) the website is owned by the state government
(d) the website is not safe
Answer
B
Question 23. Missing values in a series can be inserted as
(a) NaN
(b) NULL
(c) NIL
(d) All of these
Answer
A
Question 24. While reading a CSV file Debanjan wanted to skip 2 rows each time, what parameter he has to write with the read_csv() function?
(a) Skip=2
(b) skip=2
(c) rows=2
(d) skiprows=2
Answer
D
Question 25. A dataframe “studs” is created with columns “Name”,”Age” . The column “Age” can now be
(a) renamed
(b) deleted
(c) modified
(d) All of the above operations are possible
Answer
D
Section B
Question 26. A Series “practice” was created as follows:
import pandas as als
practice=als.Series(20,index=range(1,10,3))
How many values does the Series contain?
(a) 3
(b) 4
(c) 1
(d) Series cannot be created using range()
Answer
A
Question 27. Given below is a code , what will be the output of the print statement?
import pandas as pd
import numpy as np
s1=np.arange(1,6,2)
s2=pd.Series(index=s1,data=s1**2)
print(s2)
(a) 1 3
3 9
5 25
(b) 2 4
4 16
6 36
(c) 1 1
2 4
3 9
(d) None of these
Answer
A
Question 28. Mack a student at Stanford University has created a Series “os” storing names of some operating systems as values, as follows :
import pandas as pd
os=pd.Series([“Windows”,“Linux”,“Unix”,“DOS”],index=[10,20,30,40])
Now, he wants to create another Series “newos” with values same as “os” but index as
double of the indexes of “os”. The statement he should write
(a) newos=pd.Series(os.value,index=os.index*2)
(b) newos=pd.series(os.values,indexes=index*2)
(c) newos=pd.Series(os.values,index=os.index*2)
(d) Both (a) and (b)
Answer
C
Question 29. An echo chamber is
(a) small group of like minded people in a web app or social media
(b) a chatting room of a state
(c) a common room of a country
(d) a room of employees of an organisation
Answer
A
Question 30. Given the following plot showing number of admissions in 4 schools . The code is missing a clause . What will be the correct clause to plot the chart?
import matplotlib.pyplot as plt
admissions=[220,440,800,110]
schools=[“SchoolA”,“SchoolB”,“SchoolC”,“SchoolD”]
plt______ (schools,admissions,color=‘orange’)
plt.show()

The code for the above plot and to show it should be
(a) Barh()
(b) bar()
(c) hist()
(d) histogram()
Answer
B
Question 31. Given below are two statements:
Statement A A legend box must be given when data of multiple elements are plotted
to compare , in a bar chart.
Statement B The legend is shown using the description() function.
(a) Statement A is correct.
(b) Statement B is correct.
(c) Statement A is correct, but Statement B is incorrect.
(d) Statement A is incorrect, but Statement B is correct.
Answer
C
Question 32. In plotting a line chart, the abbreviation “-“ produces a
(a) dotted line
(b) solid line
(c) dash-dot line
(d) dashed line
Answer
B
Question 33. Link softwares had developed a software, but they found that the software code was stolen and sold by another company with their name, what is this act called?
(a) Identity theft
(b) Stalking
(c) Plagiarism
(d) Code theft
Answer
C
Question 34. Given the statements regarding open office:
Statement A Provided by OpenOffice.org.
Statement B Used for processing of official jobs like documentation, calculation, etc.
Statement C It requires payment for use.
Statement D It is a database management software.
Which of the statements justify proper use of Internet?
(a) Statement A and Statement B
(b) Statement B and Statement C
(c) Statement C and Statement D
(d) Statement B and Statement D
Answer
A
Question 35. Given the following code data of a series “Elements” storing the details of some metals and non-metals:
Index Values
P Potassium
S Sodium
I Iron
Z Zinc
The output of the command Elements.loc[‘P’:’S’] will be
(a) P Potassium
(b) P Potassium
S Sodium
(c) S Sodium
(d) Z Zinc
Answer
B
Question 36. IAD means
(a) Indian Accessibility Domain
(b) Internet Accessibility Domain
(c) Internet Addiction Disorder
(d) None of the above
Answer
C
Question 37. The proper statement that would delete a dataframe “df1” entirely is
(a) df1.remove()
(b) df1.clear()
(c) del df1
(d) remove df1
Answer
C
Question 38. Softwares that allow you to try the software for free, before use are called
(a) proprietary softwares
(b) sharewares
(c) freewares
(d) free softwares
Answer
B
Question 39. What is the difference between reindex() and reset_index() functions?
(a) The reindex () function removes the indexes permanently and reset_index() sorts the indexes.
(b) No difference
(c) The reindex() function modifies old indexes with new indexes and reset_index() resets the indexes to default indexes.
(d) reindex() arranges the values and reset_index() arranges the indexes.
Answer
C
Question 40. Given the Series ‘‘Colors’’ as follows:
Colors
Index Value
R Red
G Green
V Violet
Y Yellow
M Magenta
The following operations were done on the Series:
Colors[‘V’]=‘Violet Royal’
Colors.pop(‘Y’)
Colors.pop(‘M’)
print(Colors[0:2])
(a) R Red
(b) G Green
(c) R Red
G Green
(d) R Red
G Green
V Violet Royal
Answer
C
Question 41. Which of the following are principles of net neutrality?
(a) No blocking
(b) No paid prioritisation
(c) No throttling
(d) All of the above
Answer
D
Question 42. The command to display the number of values in the ‘Name’ column of a dataframe ‘Employee’ is
(a) Employee.size
(b) Employee.elements
(c) Employee[‘Name’].size
(d) Employee[‘Name’].NOE
Answer
C
Question 43. Given a series created by the statement:
s1=pd.Series([12,14,17,21])
The output of the statement s1[s1%3==0] is

Answer
C
Question 44. A dataframe “Books “ has to be created as follows:
Index Bookname Pub
0 Quantum Physics PHI
1 Inorganic Chemistry TMH
2 Trigonometry Arihant
Kavita has created two lists Lst1, Lst2 storing the Booknames and the Publishers as follows:
Lst1=[‘ Quantum Physics’, ‘Inorganic Chemistry’, ‘Trigonometry’]
Lst2=[‘PHI’,‘TMH’,‘Arihant’]
Now, she wants to create the dataframe with both lists, the correct command will be
(a) import pandas as pd
Lstbooks=[Lst1,Lst2]
Books=pd.DataFrame(Lst1,Lst2,columns=[‘Bookname’,’Pub’])
(b) import pandas as pd
Lstbooks=[Lst1]
Books=pd.DataFrame(Lst1,Lst2,columns=[‘Bookname’,’Pub’])
(c) import pandas as pd
Lstbooks=[Lst1,Lst2]
Books=pd.dataframe(Lst1,Lst2,columns=[‘Bookname’,’Pub’])
(d) Dataframe cannot be created from lists
Answer
A
Question 45. Which of the following is an example of active digital footprint?
(a) Sharing personal information on Facebook, Instagram, etc.
(b) Signing up when creating mail accounts.
(c) Acceptance to install cookies when prompted to do so.
(d) All of the above
Answer
D
Question 46. A CSV file “passenger.csv” stores the following information of passengers:
Pno Pname Mode KM
1 Rita Bus 267
2 Jennet Railway 890
3 Sujan Air 667
To read the first two rows from the file into a dataframe “Passenger” , the command
will be (assuming the file is stored in c:\ and pandas is imported as pd)
(a) Passenger=pd.read…csv(“c:\passenger.csv”,nrows=2)
(b) Passenger=read…csv(“c:\passenger.csv”,nrows=2)
(c) Passenger=pd.read…csv(“c:\passenger.csv”,nrows=3,header=None)
(d) Passenger=pd.read…csv(“c:\passenger.csv”,rows=2,Header=None)
Answer
A
Question 47. A code given as :
import pandas as pd
s1=pd.Series([101,102,103,104])
s1[4]=90
s1.drop(2)
print(s1)
What will be the output of the code?

Answer
C
Question 48. A dataframe ”Memory” stores the following data:
Index Type Capacity
0 HDD 500
1 Pen drive 64
2 DVD 4.7
3 CD 0.65
The output of the command Memory.ndim is
(a) 1
(b) 2
(c) 3
(d) 4
Answer
B
Question 49. Given the statements with respect to Python dictionaries:
Statement A In Python Pandas, dictionaries can be used to create dataframes.
Statement B In Python Pandas, dictionaries can be used to create series.
(a) Both statements are correct.
(b) Both statements are incorrect.
(c) Statement A is correct , but Statement B is incorrect.
(d) Statement A is incorrect, but Statement B is correct.
Answer
A
Section C
(Case Study Based Questions)
Vikrant has created a dataframe “Car” as given below . He wants to see certain statistics of the dataframe and perform certain operations on it. He is not sure about some of the commands. Help him in his operations.
Index Model Mfg Price
0 KT100 Chevrolet 456000
1 MC7800 Mercedes 890000
2 U4500 Maruti 500000
import pandas as pd
Car=pd.DataFrame({‘Model’:[‘KT100’,‘MC7800’,‘U4500’],‘Mfg’:[‘Chevrolet’,‘Mercedes’,‘Maruti’],‘Price’:[456000,890000,500000]})
Question 50. The statement to add a new column “CC” containing [1200,1400,2900] would be
(a) Car.addcolumn=[1200,1400,2900]
(b) Car.newcolumn=[1200,1400,2900]
(c) Car[“CC”]=[1200,1400,2900]
(d) Columns cannot be added to dataframe after creation
Answer
C
Question 51. To get the output as “2 Maruti” the command will be
(a) Car.loc[2:,‘Mfg’]
(b) Car.loc[1:,‘Mfg’]
(c) Car.loc[0:,‘Price’]
(d) None of these
Answer
A
Question 52. The command to change the index order to 2,1,0 will be
(a) Car.resetindex([2,1,0])
(b) Car.reindex([2,1,0])
(c) Car.re_index([2,1,0])
(d) Car.changeindex([2,1,0])
Answer
B
Question 53. To see the data type of the ‘Price’ column the command will be
(a) Car[‘Price’].type
(b) ‘Price’.type
(c) Car[‘Price’].dtype
(d) ‘Price’.dtype
Answer
C
Question 54. The output of the statements will be
Car[‘Mfg’]= [‘Rollsroyce’,’Mercedes’,’Tata’]
print(Car)
(a) Index Model Mfg Price
0 KT100 Rollsroyce 456000
1 MC7800 Mercedes 890000
2 U4500 Tata 500000
(b) Index Model Mfg Price
0 KT100 Chevrolet 456000
1 MC7800 Mercedes 890000
(c) Index Model Mfg Price
1 MC7800 Mercedes 890000
2 U4500 Maruti 500000
(d) Dataframes cannot be modified by the given statements
Answer
A
Question 55. What will be the output of the code?
Car[‘Price’]=Car[‘Price’]+5
print(Car[2:])
(Assume the initial dataframe)
(a) Maruti 500000
(b) 500000
(c) 2 U4500 Maruti 500000
(d) U4500 500000
Answer
C