<python pandas add a fixed value to get cumulative...
# community-feeds
r
python pandas add a fixed value to get cumulative sum I have a dataframe , I want to add a fixed number 5 to the first element of the dataframe, to get cumulative sum import pandas as pd data = {'Values': [10, 5000, 6000, 7000, 8000, 9000, 8000]} df = pd.DataFrame(data)

https://i.stack.imgur.com/8SmSO.png

Expected result like below, the first row is calculate 10 + 5 =15, second row is cumulative sum 15+5 = 20, then 20+5

https://i.stack.imgur.com/6xadT.png

please...