Python: Grouping by date and finding the average of a column inside a dataframe
问题 I have a data frame that has a 3 columns. Time represents every day of the month for various months. what I am trying to do is get the 'Count' value per day and average it per each month, and do this for each country. The output must be in the form of a data frame. Curent data: Time Country Count 2017-01-01 us 7827 2017-01-02 us 7748 2017-01-03 us 7653 .. .. 2017-01-30 us 5432 2017-01-31 us 2942 2017-01-01 us 5829 2017-01-02 ca 9843 2017-01-03 ca 7845 .. .. 2017-01-30 ca 8654 2017-01-31 ca