Skip to content

Tag: cumulative-sum

How do you cumulatively aggregate string in pandas?

I have a column that contains strings. I want to cumulatively aggregate the string through the y-axis. This is the desired output. Something like this can be achieved using the expanding or cumsum() function, however it appears to work for numeric attributes only. Answer a quick idea output: or just: output: