title: Iterating through the pandas df rows and do an operation
body: <p>I have a pandas dataframe which looks as below </p>
  
  <pre><code>    Date          SKU     Balance
  0   1/1/2017        X1       8
  1   1/1/2017        X2      45
  2   1/1/2017        X1      47
  3   1/1/2017        X2      16
  4   2/1/2017        X1      14
  5   2/1/2017        X2      67
  6   2/1/2017        X2       9
  8   2/1/2017        X1      66
  9   2/1/2017        X1     158
  </code></pre>
  
  <p>My first goal is to generate multiple dataframe filtered by every single day </p>
  
  <p>for which I coded </p>
  
  <pre><code>df_1stjan = df.query("Date == \"1/1/2017\"")
  </code></pre>
  
  <p>And I got the below result</p>
  
  <pre><code>    Date          SKU     Balance
  0   1/1/2017        X1       8
  1   1/1/2017        X2      45
  2   1/1/2017        X1      47
  3   1/1/2017        X2      16
  </code></pre>
  
  <p>My second goal is to groupby SKU's and I coded </p>
  
  <pre><code>df_1stjan_uSKU = df_1stjan.groupby(['SKU','Date'], \
                           as_index=False).agg({'Balance':'sum'})
  </code></pre>
  
  <p>And I got the below result</p>
  
  <pre><code>Date          SKU     Balance
  0   1/1/2017        X1      55
  1   1/1/2017        X2      61
  </code></pre>
  
  <p>At the moment I could only code to generate df for only one date at a time a</p>
  
  <p>But I need to write a function or loop to automate it for all the days of 2017.</p>
  
  <p>Note the Date column has string dtype</p>