Statistics with pandas DataFrames

The pandas DataFrame has a dozen statistical methods. The following table lists these methods along with a short description:

Method

Description

describe

This method returns a small table with descriptive statistics.

count

This method returns the number of non-NaN items.

mad

This method calculates the mean absolute deviation, which is a robust measure similar to the standard deviation.

median

This method returns the median. This is equivalent to the value at the 50th percentile.

min

This method returns the lowest value.

max

This method returns the highest value.

mode

This method returns the mode, which is the most frequently occurring value.

std

This method returns the standard ...

Get Python Data Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.