Skip to content
Advertisement

Modify output from Python Pandas describe

Is there a way to omit some of the output from the pandas describe? This command gives me exactly what I want with a table output (count and mean of executeTime’s by a simpleDate)

JavaScript

However that’s all I want, count and mean. I want to drop std, min, max, etc… So far I’ve only read how to modify column size.

I’m guessing the answer is going to be to re-write the line, not using describe, but I haven’t had any luck grouping by simpleDate and getting the count with a mean on executeTime.

I can do count by date:

JavaScript

or executeTime by date:

JavaScript

But can’t figure out the syntax to combine them.

My desired output:

JavaScript

Advertisement

Answer

Describe returns a series, so you can just select out what you want

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement