title: Merging rows and summing values by date in Python
body: <p>I have a data frame that has multiple duplicated instances, sorted by date. It looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/1LRIz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1LRIz.png" alt="enter image description here"></a></p>
  
  <p>And I am trying to merge the rows by date for matching "Keywords", and sum the "Views" count.</p>
  
  <p>The result I am looking to obtain is the following:</p>
  
  <p><a href="https://i.stack.imgur.com/jhHIt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jhHIt.png" alt="enter image description here"></a></p>
  
  <p>Could anyone hint me how I could achieve that in Python? Thank you.</p>
  
  <p>The data frame:</p>
  
  <pre><code> df = pd.DataFrame([["3/8/14", "adapter", 2], ["3/8/14", "adapter", 5], ["3/8/14", "charger", 1],
                     ["13/8/14", "adapter", 1], ["13/8/14", "battery-case", 0]],
                    columns=['Date', 'Keyword', 'Views'])
  </code></pre>