Assuming you have an hourly pandas date column named date_column, you can aggregate/reshape the data by date using the groupby and date functions as follows:
main.py313 chars10 lines
This will output:
main.py51 chars4 lines
Here, we are grouping the data frame by the date (ignoring the time) using the groupby() method and pd.to_datetime() function. The sum() method is calculating the sum of all other columns (in our example we only have one column).
gistlibby LogSnag