title: To output the closing price, total dividends of each year from a time-series dataframe
body: <p>My dataframe look like this:</p>
  <pre class="lang-py prettyprint-override"><code>            Open   High    Low  Close    Volume  Dividends  Stock Splits
  Date                                                                     
  2015-08-07  16.64  16.64  16.64  16.64         0        0.0             0
  2015-08-11  16.51  16.59  16.14  16.16  11408900        0.0             0
  2015-08-12  15.88  15.88  15.16  15.27  24258500        0.0             0
  2015-08-13  15.33  15.69  15.33  15.58   8237600        0.0             0
  2015-08-14  15.59  15.83  15.59  15.78   4399600        0.0             0
  ...           ...    ...    ...    ...       ...        ...           ...
  
  2020-08-03  19.75  19.75  19.45  19.45   7352600        0.0             0
  2020-08-04  19.70  19.99  19.64  19.69   4250500        0.0             0
  2020-08-05  19.87  19.98  19.59  19.83   3414080        0.0             0
  2020-08-06  20.11  20.56  20.02  20.40   6128100        0.0             0
  2020-08-07  20.52  20.69  20.40  20.60   8295000        0.0             0
  </code></pre>
  <p>I like to select the closing price of each year and also calculate the average &quot;Volume&quot; and Total Dividends for the year.</p>
  <p>The output to like this:</p>
  <pre class="lang-py prettyprint-override"><code>2015  20.52... 
  
  2016  21.53...
  
  2017  25.33...
  
  ....
  </code></pre>
  <p>Any help would be very much appreciated. Thanks!</p>