Anyone can sharpen their knowledge of Pandas Library with Pandas Multiple Choice Questions And Answers.
MCQs
Question 1:
Suppose that you are given two lists: a = [1,2,3] b = [4,5,6] Your task is to create a list which contains all the elements of a and b in a single dimension. Output: a = [1,2,3,4,5,6] Which of the following functions will you use? A. a.append(b) B. a.extend(b) C. any one of the above D. none of the above
Answer: B
Question 2:
What will be output for the following code? import pandas as pd import numpy as np s = pd.Series(np.random.randn(4)) print s.ndim A. 0 B. 1 C. 2 D. 3
Answer: B
Question 3:
What will be output for the following code? import pandas as pd s = pd.Series([1,2,3,4,5],index = ['a','b','c','d','e']) print s['a'] A. 1 B. 2 C. 3 D. 4
Answer: A
Question 4:
What will be output for the following code? import pandas as pd import numpy as np s = pd.Series(np.random.randn(2)) print s.size A. 0 B. 1 C. 2 D. 3
Answer: C
Question 5:
What we pass in DataFrame in pandas ? A. Integer B. String C. Pandas series D. All of the above
Answer: C
Question 6:
We can analyze the data in pandas with A. Series B. DataFrame C. Both of the above D. None of the above
Answer: C
Question 7:
The way to install the pandas library A. install pandas B. pandas install python C. python install pandas D. None of the above
Answer: D
Question 8:
Series in Pandas is A. 1 dimensional array B. 2 dimensional array C. 3 dimensional array D. None of the above
Answer: A
Question 9:
Minimum numbers of arguments require to pass in pandas series? A. 0 B. 1 C. 2 D. 3
Answer: B
Question 10:
Minimum numbers of arguments require to pass in pandas series? A. 0 B. 1 C. 2 D. 3
Answer: B
Question 11:
In data science, which of the python library is more popular? A. Numpy B. Pandas C. OpenCv D. Django
Answer: B
Question 12:
For what purpose a Pandas is used? A. To create a GUI programming B. To create a database C. To create a High level array D. All of the above
Answer: C
Question 13:
DataFrame in pandas is A. 1 dimensional array B. 2 dimensional array C. 3 dimensional array D. None of the above
Answer: B
Question 14:
Which of the following can be used to make a DataFrame? A. Series B. DataFrame C. Structured ndarray D. All of the above
Answer: D
Question 15:
What happens to the indexes when any operations are done to unaligned series? A. Total B. Union C. Intersection D. All of the above
Answer: B
Question 16:
Identify the correct statement: A. Standard marker for missing data in Pandas is NaN B. Series act in a way similar to that of an array C. Both of the above D. None of the above
Answer: C
Question 17:
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 the above
Answer: D
Question 18:
Which of these is an invalid writer function in Pandas? A. to_clipboard B. to_text C. to_stata D. to_msgpack
Answer: B
Question 19:
This function in the library of Pandas allows you to manipulate data and create new variables A. read_csv function B. pivot_table function C. apply function D. merge function
Answer: C
Question 20:
Which function from the options given below can read the dataset from a large text file? A. read_json B. read_pickle C. read_hdf D. read_csv
Answer: D
Question 21:
Which of the following is used for testing for membership in the list of column names? A. in B. out C. elseif D. none of the mentioned
Answer: A
Question 22:
Which of the following method is used for transforming a SparseSeries indexed by a MultiIndex to a scipy.sparse.coo_matrix? A. SparseSeries.to_coo() B. Series.to_coo() C. SparseSeries.to_cooser() D. None of the mentioned
Answer: A
Question 23:
Which of the following list-like data structure is used for managing a dynamic collection of SparseArrays? A. SparseList B. GeoList C. SparseSeries D. All of the mentioned
Answer: A
Question 24:
Which of the following is not an indexed object? A. SparseSeries B. SparseDataFrame C. SparsePanel D. None of the mentioned
Answer: D
Question 25:
Which of the following is the base layer for all of the sparse indexed data structures? A. SArray B. SparseArray C. PyArray D. None of the mentioned
Answer: B