this is a basic quesiton and easy to do in excel but have not an idea in python and every example online uses groupby with multiple names in the name column. So, all I need is a row value of weights from a single column. Suppose I have data that looks like this:
name value
0 A 45
1 B 76
2 C 320
3 D 210
The answer should look like this:
0 name value weights
1 A 45 0.069124
2 B 76 0.116743
3 C 320 0.491551
4 D 210 0.322581
thank you,