This set of Data Science Multiple Choice Questions & Answers (MCQs) focuses on “Plotting in Python”.
1. The plot method on Series and DataFrame is just a simple wrapper around ____________
a) gplt.plot()
b) plt.plot()
c) plt.plotgraph()
d) none of the mentioned
View Answer
Explanation: If the index consists of dates, it calls gcf().autofmt_xdate() to try to format the x-axis nicely.
2. Point out the correct combination with regards to kind keyword for graph plotting.
a) ‘hist’ for histogram
b) ‘box’ for boxplot
c) ‘area’ for area plots
d) all of the mentioned
View Answer
Explanation: The kind keyword argument of plot() accepts a handful of values for plots other than the default Line plot.
3. Which of the following value is provided by kind keyword for barplot?
a) bar
b) kde
c) hexbin
d) none of the mentioned
View Answer
Explanation: bar can also be used for barplot.
4. You can create a scatter plot matrix using the __________ method in pandas.tools.plotting.
a) sca_matrix
b) scatter_matrix
c) DataFrame.plot
d) all of the mentioned
View Answer
Explanation: You can create density plots using the Series/DataFrame.plot.
5. Point out the wrong combination with regards to kind keyword for graph plotting.
a) ‘scatter’ for scatter plots
b) ‘kde’ for hexagonal bin plots
c) ‘pie’ for pie plots
d) none of the mentioned
View Answer
Explanation: kde is used for density plots.
6. Which of the following plots are used to check if a data set or time series is random?
a) Lag
b) Random
c) Lead
d) None of the mentioned
View Answer
Explanation: Random data should not exhibit any structure in the lag plot.
7. Plots may also be adorned with error bars or tables.
a) True
b) False
View Answer
Explanation: There are several plotting functions in pandas.tools.plotting.
8. Which of the following plots are often used for checking randomness in time series?
a) Autocausation
b) Autorank
c) Autocorrelation
d) None of the mentioned
View Answer
Explanation: If the time series is random, such autocorrelations should be near zero for any and all time-lag separations.
9. __________ plots are used to visually assess the uncertainty of a statistic.
a) Lag
b) RadViz
c) Bootstrap
d) None of the mentioned
View Answer
Explanation: Resulting plots and histograms are what constitutes the bootstrap plot.
10. Andrews curves allow one to plot multivariate data.
a) True
b) False
View Answer
Explanation: Curves belonging to samples of the same class will usually be closer together and form larger structures.
Sanfoundry Global Education & Learning Series – Data Science.
Here’s the list of Best Books in Data Science.
- Check Programming Books
- Check Data Science Books
- Practice Computer Science MCQs
- Apply for Computer Science Internship
- Practice Programming MCQs