title: Resample pandas dataframe based on two columns
body: <p>I got a pandas dataframe with two columns. A date and a ratingnumber, like this:</p>
  <pre><code>       Date            Rating
      0  2020-07-28      9
      1  2020-07-28      10
      2  2020-07-27      8
      3  2020-07-26      10
      4  2020-07-26      9
  &lt;class 'pandas.core.frame.DataFrame'&gt;
  RangeIndex: 100 entries, 0 to 99
  </code></pre>
  <p>I want to resample the DataFrame with time interval per day and count the amount of ratings per day and get the average rating per day. So the new dataframe should look like this:</p>
  <pre><code>   Date            Amount of Ratings      Average rating
  0  2020-07-28      2                      9.5
  1  2020-07-27      1                      8
  2  2020-07-26      2                      9.5
  </code></pre>
  <p>How would I do that?</p>
  <p>I changed the index to Datetimeindex and counted the rows with count(), but it counts all columns, where I want to resample the Rating column to Average rating per day.</p>
  <p>This is what I tried:</p>
  <pre><code>df = df.set_index(pd.to_datetime(df['Date']))
  df_resampled = df.resample('D').count()
  
  Output:
                 Date    Rating
  Date                    
  2020-07-21     17      17
  2020-07-22     14      14
  2020-07-23     16      16
  2020-07-24     14      14
  2020-07-25      9       9
  </code></pre>