title: python apply function with df as input
body: <p>I have a function that uses 2 dataframes and a number as inputs. I want to apply that function to every row in a dataframe while using an input from that dataframe in the aforementioned function.</p>
  <pre><code>def function(df1, df2, number):
  
  df3['result'] = df3['number'].apply(function, args=(df1, df2, df3['number']))
  </code></pre>
  <p>However I am getting <strong>TypeError: 'int' object is not subscriptable</strong>. Any suggestions?</p>