title: How to implement list of variables to function from DataFrame in Python Pandas?
body: <p>How can I create funcion in python where in one of parameters I will have possibility to implement list of varaibles of DataFrame ?</p>
  <p>For instance I have DataFrame like below:</p>
  <pre><code>df = pd.DataFrame({&quot;TARGET&quot; : [1,0,1],
                     &quot;age&quot; : [22, 54, 67],
                     &quot;power&quot; : [100, 200, 345],
                     &quot;height&quot; : [180, 190, 178]})
  </code></pre>
  <p>And for instance I have function:</p>
  <pre><code>def my_function(data, variables, target_variable):
      .....
  </code></pre>
  <p>And in:</p>
  <ul>
  <li><p>data - I would like to implement my DataFrame (df)</p>
  </li>
  <li><p>target_variable - I would like to impelment target variable of my DataFrame (&quot;TARGET&quot;)</p>
  </li>
  <li><p>variables - list of selected variables from DataFrame for instance (&quot;age&quot; and &quot;power&quot;)</p>
  <p>my_function(df, [&quot;age&quot;, &quot;power&quot;], &quot;TARGET&quot;) - does not work</p>
  </li>
  </ul>