pandas objects provide the .describe() method, which returns a set of summary statistics of the object's data. When applied to a DataFrame, .describe() will calculate the summary statistics for each column. The following code calculates these statistics for both stocks in omh.
With one quick method call, we have calculated the count, mean, standard deviation, minimum, and maximum values, and even the 25, 50, and 75 percentiles for both series of stock data.
.describe() can also be applied to a Series. The following code calculates summary statistics for just MSFT.
And only the mean can be obtained ...