I have a dataframe as the following:

```
Member Category Total
1001      1       5  
1001      2       4  
1001      3       9 
1003      1       7
1003      2       5
1003      3       2
1005      1       2 
1005      3       5

```

I need to get:

```
 Member Category Total  Average
    1001      1       5     0.27
    1001      2       4     0.22
    1001      3       9     0.5
    1003      1       7     0.5
    1003      2       5     0.35
    1003      3       2     0.15
    1005      1       2     0.28
    1005      3       5     0.72

```

That is, the average of totals for each member. For instance, the member 1001 has a total of 18, in which the category 1 represents 27% of the total. Therefore the average would be 0.27.