I have a dataframe with 3 columns- start_time, end_time, energy where start_time and end_time are date time format and energy is energy spent between these two time. ![enter image description here][1]
My goal is to calculate the energy spent each day. Instances for which the start_time and end_time have same date, the energy value would be allocated to that date. But I need to find a way to classify energy values that have a different dates for start_time and end_time. For example a instance in dataframe like this-
start_time end_time energy
2014-06-09 20:54:10 2014-06-11 05:04:14 1114
Should produce instances like these in output data frame-
date energy
2014-06-09 <energy consumed between 2014-06-09 20:54:10 to 2014-06-09 23:59:59>
2014-06-10 <energy consumed between 2014-06-10 00:00:00 to 2014-06-10 23:59:59>
2014-06-11 <energy consumed between 2014-06-11 00:00:00 to 2014-06-11 05:04:14>