The correct answer is D. all of the mentioned.
The kind
keyword is used to specify the type of graph to be plotted. The following are some of the valid values for the kind
keyword:
hist
: Histogrambox
: Boxplotarea
: Area plotline
: Line plotbar
: Bar plotscatter
: Scatter plotpie
: Pie chartpolar
: Polar plotsurface
: Surface plotcontour
: Contour plot3d
: 3D plot
For example, to plot a histogram of the data in a DataFrame called df
, you would use the following code:
“`
import matplotlib.pyplot as plt
df.hist(kind=’hist’)
plt.show()
“`
To plot a boxplot of the data in a DataFrame called df
, you would use the following code:
“`
import matplotlib.pyplot as plt
df.boxplot(kind=’box’)
plt.show()
“`
To plot an area plot of the data in a DataFrame called df
, you would use the following code:
“`
import matplotlib.pyplot as plt
df.plot(kind=’area’)
plt.show()
“`
And so on.