Point out the correct combination with regards to kind keyword for graph plotting.

'hist' for histogram
'box' for boxplot
'area' for area plots
all of the mentioned

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: Histogram
  • box: Boxplot
  • area: Area plot
  • line: Line plot
  • bar: Bar plot
  • scatter: Scatter plot
  • pie: Pie chart
  • polar: Polar plot
  • surface: Surface plot
  • contour: Contour plot
  • 3d: 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.

Exit mobile version