title: Use Pandas groupby() + apply() with arguments
body: <p>I would like to use <code>df.groupby()</code> in combination with <code>apply()</code> to apply a function to each row per group.</p>
  
  <p>I normally use the following code, which usually works (note, that this is without <code>groupby()</code>):</p>
  
  <pre><code>df.apply(myFunction, args=(arg1,))
  </code></pre>
  
  <p>With the <code>groupby()</code> I tried the following:</p>
  
  <pre><code>df.groupby('columnName').apply(myFunction, args=(arg1,))
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <blockquote>
    <p>TypeError: myFunction() got an unexpected keyword argument 'args'</p>
  </blockquote>
  
  <p>Hence, my question is: <strong>How can I use <code>groupby()</code> and <code>apply()</code> with a function that needs arguments?</strong></p>