1

How to aggregate numbers in a dataframe into a new column gradual sum of column number into a new column:

Index numbers new column
0 1 1
1 2 3
2 3 6
3 4 10
4 5 15
1

1 Answer 1

1

The solusion for getting the result and new column as described in the table:

df.cumsum()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.