Home
MCQS
Python MCQ Quiz Hub
Pandas MCQ Questions Set 1
Choose a topic to test your knowledge and improve your Python skills
1. Which of the following are modules/libraries in Python?
NumPy
Pandas
Matplotlib
All the above
2. NumPy stands for ____
Number Python
Numerical Python
Numbers in Python
None of the above
3. Which of the following libraries allows to manipulate, transform and visualize data easily and efficiently.
Pandas
NumPy
Matplotlib
All the above
4. PANDAS stands for _____________
Panel Data Analysis
Panel Data analyst
Panel Data
Panel Dashboard
5. ____ is an important library used for analyzing data.
Math
Random
Pandas
None of the above
6. Important data structure of pandas is/are _
Series
Data Frame
Both of the above
None of the above
7. Which of the following library in Python is used for plotting graphs and visualization
Pandas
NumPy
Matplotlib
None of the above
8. Pandas Series can have _________________ data types
NumPy
Pandas
Matplotlib
None of the above
9. Which of the following command is used to install pandas?
pip install pandas
install pandas
pip pandas
None of the above
10. A __________ is a collection of data values and operations that can be applied to that data.
Data Structure
Data Frame
Table
None of the above
11. A _______________ is a one-dimensional array.
Data Frame
Series
Both of the above
None of the above
12. Which of the following statement is wrong?
We can create Series from Dictionary in Python.
Keys of dictionary become index of the series.
Order of indexes created from Keys may not be in the same order as typed in dictionary.
All are correct
13. A Series by default have numeric data labels starting from ______________.
3
2
1
0
14. The data label associated with a particular value of Series is called its ______
Data value
Index
Value
None of the above
15. Which of the following module is to be imported to create Series?
NumPy
Pandas
Matplotlib
None of the above
16. Which of the following function/method help to create Series?
series( )
Series( )
createSeries( )
None of the above
17. When you print/display any series then the left most column is showing _________ value.
Index
Data
Value
None of the above
18. How many values will be there in array1, if given code is not returning any error? >>> series4 = pd.Series(array1, index = [“Jan”, “Feb”, “Mar”, “Apr”])
1
2
3
4
19. Which of the following statement will create an empty series named “S1”?
S1 = pd.Series(None)
S1 = pd.Series( )
Both of the above
None of the above
20. How many elements will be there in the series named “S1”? >>> S1 = pd.Series(range(5)) >>> print(S1)
5
4
6
None of the above
21. When we create a series from dictionary then the keys of dictionary become ____
Index of the series
Value of the series
Caption of the series
None of the series
22. When we create a series from dictionary then the keys of dictionary become ____
Index of the series
Value of the series
Caption of the series
None of the series
23. When we create a series from dictionary then the keys of dictionary become ____
Index of the series
Value of the series
Caption of the series
None of the series
24. Write the output of the following : >>> S1=pd.Series(14, index = ['a', 'b', 'c']) >>> print(S1)
a 14 b 14 c 14 dtype: int64
a 14 dtype: int64
Error
None of the above
25. Write the output of the following: >>> S1=pd.Series(14, 7, index = ['a', 'b', 'c']) >>> print(S1)
a 14 b 7 c 7 dtype: int64
a 14 b 7 dtype: int64
Error
None of the above
26. What type of error is returned by following code? import pandas as pd S1 = pd.Series(data = (31, 2, -6), index = [7, 9, 3, 2]) print(S1)
SyntaxError
IndexError
ValueError
None of the above
27. We can imagine a Pandas Series as a ______________ in a spreadsheet
Column
Cell
Table
None of the above
28. Which of the following statement is correct for importing pandas in python?
import pandas
import pandas as pd
import pandas as pds
All the above
29. What type of error is returned by following statement? import pandas as pnd pnd.Series([1,2,3,4], index = [‘a’,’b’,’c’])
SyntaxError b. c.
IndexError
ValueError
None of the above
30. Which attribute is used to give user defined labels in Series
. index
data
values
None of the above
31. Fill in the blank to get the ouput as 3 import pandas as pnd S1=pnd.Series([1,2,3,4], index = ['a','b','c','d']) print(S1[___________])
‘c’
2
c
All the above
Submit