sample data
array_data = [
[6326586, 0.4126],
[6326586, 0.48],
[6326586, 0.45],
[6326586, 0.35],
[6326586, 0.2685],
[6326614, 0.4008],
[6326614, 0.1],
[6326614, 0.074],
[6327407, 0.066],
[6327408, 0.1],
[6344999, 0.1572],
[6344999, 0.003],
[6394500, 0.2112]
]
I have a nested array if the first index value is the same as the other value then sum of these values as show below result
I need an expected array
new_array_data = [
[6326586, 1.9611],
[6326614,0.5748],
[6327407, 0.066],
[6327408, 0.1],
[6344999, 0.1602],
[6394500, 0.2112],
]
Thanks