Grouping and summing of dataset - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Grouping and summing of dataset (/thread-30098.html) |
Grouping and summing of dataset - jef - Oct-04-2020 I have this dataset that I imported with pandas: I want to total individual instances of the number of hours and liters. Each "hour" represents an hourly interval on my measuring device. Each "water" is the number of liters of water that flowed through the device in that hour. Thus the desired output is: If there are missing rows of dates/hours or if there is a row where water=BLANK or water=0, we should skip those.Whats the easiest way to add this up? |