df
billsec disposition Date Hour
0 185 ANSWERED 2016-11-01 00
1 0 NO ANSWER 2016-11-01 00
2 41 ANSWERED 2016-11-01 01
3 4 ANSWERED 2016-12-02 05
There is a table, me need to get out of it a summary table with the following data:
The rows are hours of the day, and the columns are the days, in the days of the total number of calls / missed / total duration of calls.
How to add additional columns (All, Lost, Time) in this table. I have so far turned out only to calculate the total duration of calls per hour, and their total number. Truth in different tables...
df.pivot_table(rows='Hour',cols='Date',aggfunc=len,fill_value=0)
df.pivot_table(rows='Hour',cols='Date',aggfunc=sum,fill_value=0)