title: Creating a dataframe column in python, based on the conditions on other columns
body: <p>I have the following DataFrame (in reality I'm working with around 20 million rows):</p>
  
  <pre><code>shop month day sale
  1      7     1   10
  1      6     1   8
  1      5     1   9
  2      7     1   10
  2      6     1   8
  2      5     1   9
  </code></pre>
  
  <p>I want another column: "Prev month sales", where sales are equal to the "Sales of previous month with same day, e.g. </p>
  
  <pre><code>   shop month  day  sale prev month sale
      1      7     1   10     8
      1      6     1   8      9
      1      5     1   9      9
      2      7     1   10     8
      2      6     1   8      9
      2      5     1   9      9
  </code></pre>