Professional Documents
Culture Documents
6.To divide the values of two dataframes, function may be used. function may be used.
(a) divide
(b) div
(c) rdiv
(d) division
7.Which of the following two functions will produce the same result ?
(a) add
(b) radd
(c) sub
(d) rsub
ANS:- b) radd
9.Which of the following arguments lets you specify index labels of dataframe through Dataframe( ) ?
(a) index
(b) columns
(c) label
(d) all of these function.
11.Which of the following can be used to specify data for creating a Dataframe ?
(a) Series
(b) DataFrame
(c) Structured ndarray
(d) All of these
ANS:- (c) 2
16.What will be the output for the following code
?import pandas as pd i
mport numpy as np
S= pd.Series(np.random.randn(4))
print (s.ndim)
(a) 0
(b) 1
(c) 2
(d) 3
ANS:- b) 1
17.What is the purpose of using ndimattribute ?
(a) It returns the number of elements in the given data structure.
(b) It returns the Series object in the form of an ndarray.
(c) It returns a list of the indexes / labels.
(d) It returns the number of dimensions of the given data structure.
ANS:- (d) It returns the number of dimensions of the given data structure.
18.PyPlot is an interface of Python's.
(a) seaborn
(b) plotly library.
(c) ggplot
(d) matplotlih
ANS:- (d) matplotlih
19.For 2D plotting using a Python library, which library interface is often used ,
(a) seaborn
(b) plotly
(c) matplotlib
(d) matplotlib.pyplot
ANS:- d) matplotlib.pyplot
20.Which of the following is not a valid chart type ?
(a) Statistical
(b) Box
(c) Pie
(d) plot( )
ANS:- d) line( )
22. Which of the following plotting functions does not plot multiple data series ?
(a) plot( )
(b) barh( )
(c) bar( )
(d) pie( )
23. The plot which tells the trend between two graphed variables is the
(a) scatter graph/chart.
(b) pie
(c) bar
(d) line
ANS:- b) plot( )
26. Which of the following function will create a vertical bar chart ?
(a) plot( )
(b) bar( )
(c) plotbar()
(d) barh( )
ANS:- a) line
30. Which argument of bar() lets you set the thickness of bar ?
(a) thick
(b) thickness
(c) width
(d) barwidth
31. Which function lets you set the title of the plot ?
(a) title( )
(b) graphtitle().
(c) plottitle( )
(d) All of these
35. Which argument must be set with plotting functions for legend( ) to display the
legends ?
(a) data (b) label (c) name (d) sequence
ANS:- (b) label