You can replace `lambda x: [x.value, x.stddev]` with `operator.attrgetter('mean', 'stddev')`, since this is the perfect use case for attrgetter. Same below since you are using such lambdas several times.