in reply to Re: HOW to calculate the column datain thread HOW to calculate the column data
If you just want to make it short:
perl -ane'$t{$F[0]}+=$F[1];$c{$F[0]}++}{printf"$_ %.3f\n",$t{$_}/$c{$_ +}for+sort+keys%t' [download]