By integrating the relevant capabilities of Matplotlib, pandas may realize some plotting capabilities based on Series and DataFrame. For those two types of data, plotting with pandas is often more convenient than the two modules of pylab and pyplot. You might still remember that, the data for our previous plotting were the monthly mean closing prices of the Coca-Cola Company's stock over the recent year. When we used the "plot()" function, we divided the index and its value into two parts. This method is with good extensibility Sure, in this example, it's absolutely possible for us to directly use "Series" as its argument. Pandas can, just like pyplot and pylab, draw plots based on the Series data type. Apart from that, it's more powerful and efficient than pyplot and pylab in the capability of plotting based on the DataFrame data type. The method adopted by pandas is "plot()". Here, as we see. When plotting with pandas, we may plot in conjunction with some functions in pyplot. Very convenient, right? Look at another example. Plot the line chart of closing prices of stock of IBM over the recent year. Is this super simple? Once we get such a dataset, we can then use the "plot()" method for plotting. The result is like this. Look at another example. Use a bar chart to compare the trading prices of stocks of the two sci-tech companies: "Intel" and "IBM" over the recent year. First, we get two such monthly trading prices and then create a DataFrame. Put them inside. Similarly, draw with the "plot()" method. The result is like this. Here, as we see, we use such an argument "kind". What does it mean? It means the kind of plot. Since it's a bar chart, we use "bar". Is it equivalent to the "bar()" function in our previous pyplot module? OK, let's have a try. This is the result of program running. It's a bar chart. We may also change the argument of "kind" to generate different kinds of plots. If we change that in the "kind" to, say,"barh" the result will be a bar chart rotated for 90 degrees as a horizontal plot. Besides, we may also add another argument "stacked", which is also very common. Set it as True. As we see, does it generate a bar chart with the stacked effect? Other choices are available in "kind". We should base on the actual needs to select the kind we want. In this question, for example, describe the data of the proportions of closing prices of stocks of Intel Corporation of each month in the first three months this year. Let's think about it, Would it be more convenient to use a pie chart? So, we may set the "kind" here as "pie" or specify the specific format. Like we did before, for the pyplot as we introduced, it's also possible to set the image attribute in the "plot()" method. Here, say, we use "marker". The data mark is a triangle. At the end of plotting with pandas, let's look at a very special graph, the box plot, aka, box and whisker diagram, which may well reflect the distribution of raw data. For example, let's compare the trading volume of stocks of two sci-tech companies: Intel and IBM over the recent year. Its data result is like this. Let's see. There're five lines inside. 1 2 3 4 5 Guess what they represent, respectively. The first line means the upper edge representing the maximum value. The fourth line is the first quartile, i.e., the 25% position. Well, the third line is the median, i.e., the 50% position. Obviously, the second line is the 75% position. And the fifth line is the lower edge, i.e., the minimum value. There might also be some exception values here. In the box plot, we may discover the distribution regularities of many data. Here, say, we see that the box for Intel is longer, while that for IBM is shorter. What does it mean? Does it mean that the trading volume of stocks of Intel is more scattered while that of IBM is more concentrated? Moreover, the distance between the median and the third quartile and that to the first quartile can also show data symmetry, right? There're more to be explored from the box plot. You guys can study it more.