I have:
pd.DataFrame({'col1':['A','A','B','F']})
col1
0 A
1 A
2 B
3 F
I want:
pd.DataFrame({'col1':['A','A','B','F'],'col2':['1A:0B:0C:0D:0E:0F','2A:0B:0C:0D:0E:0F','2A:1B:0C:0D:0E:0F','2A:1B:0C:0D:0E:1F']})
col1 col2
0 A 1A:0B:0C:0D:0E:0F
1 A 2A:0B:0C:0D:0E:0F
2 B 2A:1B:0C:0D:0E:0F
3 F 2A:1B:0C:0D:0E:1F
Requirements:
I have a column that can take one of 6 values (A:F). I want to create a new column that shows the running total of the values of that row and above.
any suggestions?