December 2017
Intermediate to advanced
386 pages
10h 42m
English
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 25th, 50th, and 75th percentiles for both series of stock data.
.describe() can also be applied to a Series. The following code calculates summary statistics for just MSFT:
Only the mean can be obtained, ...
Read now
Unlock full access