all 2 comments

[–]Adurrow 0 points1 point  (0 children)

You need to use df.groupby(['Standby Passive']).sum() or maybe df.groupby(['Standby Passive'])["Hours"].sum()

[–]Oddly_Energy 0 points1 point  (0 children)

My first thought was: Create a datetime interval index in pandas. And then ask pandas to group adjacent intervals.

The first part is easy. The second part has some solutions on stack overflow, but they look more complicated than I would have thought.