GroupBy on 1 Column - calculate the Average and Sums of the group members

lets assume following sample data:
grafik

preparing the target datatable dtTarget with a build datatable
grafik

we can do:

dtTarget = 
(From d In dtData.AsEnumerable
Group d By k=d("Location").toString.Trim Into grp=Group
Let s = grp.Sum(Function (s) CInt( s(0).toString.Trim))
Let a = grp.Average(Function (a) CInt(a(1).toString.Trim))
Let ra = New Object(){k,s,a}
Select r=dtResult.Rows.Add(ra)).CopyToDataTable

grafik
AVG for A = (100+250)/2

or more precise on the Avg

(From d In dtData.AsEnumerable
Group d By k=d("Location").toString.Trim Into grp=Group
Let tp = grp.Sum(Function (t) CInt(t(0).toString.Trim) * CInt(t(1).toString.Trim )) 
Let s = grp.Sum(Function (s) CInt( s(0).toString.Trim))
Let a =tp/s
Let ra = New Object(){k,s,a}
Select r=dtResult.Rows.Add(ra)).CopyToDataTable

grafik
Avg for A = (2*100+3*250) / (2+3)

Also have a look here for LINQ and GroupBy