2👍
✅
First, you can get the list of decimals directly by using values_list
qs = Foo.objects.order_by('date').values_list('amount', flat=True)
Secondly, if it is easier to calculate SD on floats, rather than on a list of decimals, you can do
qs = Foo.objects.order_by('date').values_list('amount', flat=True)
float_qs = map(float, qs)
Source:stackexchange.com