Код: Выделить всё
df.head()
0 Key value
1 10 500
2 11 500
3 12 600
4 12 800
5 13 1000
6 13 1200
.
.
.
200++
Код: Выделить всё
Expected Output:
0 Key value
1 10 500
2 11 500
3 12 600
4 12 800
5 12 1400 -----> Addition of 800+600 as keys are same
6 13 1000
7 13 1200
8 13 2200 -----> Addition of 1000+12000 as keys are same
.
.
200++
Подробнее здесь: https://stackoverflow.com/questions/791 ... -in-pandas
Мобильная версия