def __init__(self):
threading.Thread.__init__(self)
self.start()
self.root = None
self.ENT_bet = None
self.BTN_confirm_bet = None
self.LBL_ozon = None
import pandas as pd
my_list = [1, 2, 3, 1, 2, 3]
my_names = ['one', 'two', 'three', 'one', 'two', 'three']
df = pd.DataFrame(zip(my_names, my_list), columns=['names', 'values'])
result = df.groupby('names').cumsum()
print(result)
values
0 1
1 2
2 3
3 2
4 4
5 6