pandas: Group by splitting string value in all rows (a column) and aggregation function
问题 If i have dataset like this: id person_name salary 0 [alexander, william, smith] 45000 1 [smith, robert, gates] 65000 2 [bob, alexander] 56000 3 [robert, william] 80000 4 [alexander, gates] 70000 If we sum that salary column then we will get 316000 I really want to know how much person who named 'alexander, smith, etc' (in distinct) makes in salary if we sum all of the salaries from its splitting name in this dataset (that contains same string value). output: group sum_salary alexander 171000