Why isn't there a sum (or total) in the describe() method of a DataFrame or Series?

34 views
Skip to first unread message

Aiyong WANG

unread,
Jan 19, 2016, 1:34:41 PM1/19/16
to PyData
Hi, first of all, I like pandas very much. 
But I can get "count", "mean" from the `DataFrame.describe()` method, but there seems to be no "sum" or "total" in the result. Is there a reson for that? Or am I missing something. I know I can get the "total" value by `DataFrame.sum()`, even by `count * mean`, but `.describe()` is such a convenient way to get the base summary infomation. And the "total" value is an important element of summary, isn't it?

Goyo

unread,
Jan 19, 2016, 3:46:22 PM1/19/16
to PyData
El martes, 19 de enero de 2016, 19:34:41 (UTC+1), Aiyong WANG escribió:
Hi, first of all, I like pandas very much. 
But I can get "count", "mean" from the `DataFrame.describe()` method, but there seems to be no "sum" or "total" in the result. Is there a reson for that? Or am I missing something. I know I can get the "total" value by `DataFrame.sum()`, even by `count * mean`, but `.describe()` is such a convenient way to get the base summary infomation. And the "total" value is an important element of summary, isn't it?

In depends on the data. There are a lot of cases where the sum does not make any sense. Think of a time series of temperature measurements or the number of medical doctors per 1000 habitants in different places. I do not think it has a place amongst "summary statistics" (from the docstring).

Goyo

Reply all
Reply to author
Forward
0 new messages