If you are a mysterious skilled stock operator, or a senior employee of the Asia-Pacific Section of an unusual company, desiring to know stock information of similar companies, or an odd-lotter carefully studying stock transaction knowledge, and successful becoming a small stockholder or a Python learner, loving thinking and learning, then what we're going to talk about today might be of help to you. Let's take the information of 30 Dow Jones Industrial Average stocks as an example to illustrate simple statistics and screening. Data in other fields are similarly processed. Let's look at some examples. The first example is to calculate the mean value of the latest trading prices of Dow Jones Industrial Average stocks. Which function did we use for calculating the mean value before? Yes, the "mean()" function. Then, is there such a function for DataFrame objects? Yes, indeed. Since we're calculating the latest trading prices, we must select them first, and then use the "mean()" function to get such a mean value. The second question is to acquire the names of companies whose latest trading prices of stocks are greater than or equal to 180. Can we use the previously mentioned mode of condition screening? After selection in such a way, we can get our desired result with such a "name" attribute. Let's look at two other examples. The first one is to count the day numbers of stock price rises and drops of American Express over the recent year. It is much simple. We know that, stock price rises means the closing price is higher than the opening price. We only need to count numbers of days like this. We may use such a mode of condition screening and a function of "len()" to count such day numbers. To get price drop days, simply deduct the rise days from the total day numbers. The second example is to acquire the statistics of rise or drop of closing prices, of two consecutive days of American Express over the recent year. We may use loops to solve this question. However, in NumPy, there is also an existing function to compare two adjacent objects for increase or decrease. This function is "diff()". We may express it like this: the closing prices to be calculated, and then get its symbol. The result is like this: 1 means a rise, -1 means a drop. Then, we use the "where()" function in NumPy to calculate the status as the size of 1 or -1. As a result, we can acquire the rise or fall of closing prices of two consecutive days. Is that quite convenient? Here, you might have such a question: there are so many functions like this, how can I know whether there is the function I need or not? Then, you should know two things: one is to read more functions in relevant modules and libraries and use "help()" more, which is a habit we should develop. The other is to have confidence in Python, or confidence in the third party library you use. Whatever applications you might think of, have almost been realized with corresponding functions, as we finally discover. So, based on the above two points, as long as we find suitable functions, the efficiency of solution to problems will be higher. Sorting is something we often handle during data processing. Let's look at the example below. Sort the 30 Dow Jones Industrial Average stocks according to the latest trading prices, and list the top three company names according to the sorting result. For this question, we might use the "sort_values()" function in DataFrame for sorting. What's it based on? It's based on the latest trading price. It has an argument "by". Moreover, as we see, we're to find the top three companies. so, should be it sorting in a reverse order? We may use its argument "ascending". Set it as "False" for sorting in a reverse order. Then, use slicing, to get the "name" attribute of the top three companies. Here comes the result. Look at another example. Count the day numbers of stock opening this January. Have you been familiar with this question now? We acquire these data through condition screening, and then estimate the day numbers through "len()". Let's look at some other questions. Count the day numbers of stock opening of all months over the recent year. The question seems more difficult. How can we acquire such information from the existing data? Let's think about it. In the existing data, only such forms include months. How can we acquire months from the data? Here, we'll use another time-related function, i.e. "strptime()". Previously, we saw a function "strftime()" and its effect is to format a "time" structure into a string. By contrast, the effect of the "strptime()" function is format a string into a "time" structure. Let's consider this. Does the "time" structure surely contain information like months and years? So, let's look at the solution. Just use this function to format the original string into a "time" structure, and then select its member representing the month. Put it into a "list". What are the members of time structure here? We may view them through the help(time) module. It provides detailed explanations. Then, we use this list as a new column of DataFrame and use the "value_counts()" function to count the day numbers of stock opening each month. The result is like this. This question may also be solved with another method "groupby" in DataFrame, which we'll introduce in next section. In this section, we briefly introduced some simple statistical and processing work, based on the DataFrame object. I hope that you guys have had a basic idea of the statistical capabilities of DataFrame after learning the above examples. After continuous practice later, I hope you can apply them into your own data processing.