Lesson 3 ❮ Lesson List ❮ Top Page
❯ 3.4 Statistics
⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
EXPECTED COMPLETION TIME
❲▹❳ Video 4m 7s
☷ Interactive readings 5m
Here, we generate some normally distributed random data and compute some aggregate statistics:
Functions like mean and sum take an optional axis argument that computes the statistic over the given axis, resulting in an array with one fewer dimension.
Other methods like cumsum and cumprod do not aggregate, instead producing an array of the intermediate results:
Descriptive and Summary Statistics
count Number of non-NA values
decsribe Compute set of summary statistics for Series or each DataFrame column
min, max Minimum and maximum
cumsum Cumulative sum of elements starting from 0
cumprod Cumulative product of elements starting from 1
Instead of specifying each statistics, the method describe is useful if you want to get all the essential statistics at once.
While you can always calculate manually for mean or standard deviation, we will see which method is faster to compute both of them.
While you can always calculate manually for mean or standard deviation, we will see which method is faster to compute both of them.