title: what does "Aggregate the data to weekly level, so that there is one row per product-week combination" mean and how can I do it using python (pandas)
body: <p>I am working on a transactions data frame using python (anaconda) and I was told to Aggregate the data to a weekly level so that there is one row per product-week combination
  I want to make sure if the following code is correct because I don't think I fully understood what I need to do </p>
  
  <pre><code>dataset.groupby(['id', dataset['history_date'].dt.strftime('%W')])['sales'].sum()
  </code></pre>
  
  <p>Note my dataset contains the following:</p>
  
  <pre><code>id history_date item_id price inventory sales category_id
  </code></pre>