title: How can I create a function that creates a dataframe from another dataframe using certain columns?
body: <p>For example this is the dataframe I am starting with called df1</p>
  <pre><code>       shoe       brand         price
  0     Jordan       1             50
  1     Kyrie        1             75
  2     Harden       2             50
  3     Kobe         1             50
  4     Curry        3             75
  </code></pre>
  <p>I now want to create a function that takes the dataframe, the brand column, and the price column to return a new dataframe. This is what I am working with so far:</p>
  <pre><code>def dfFunction(dataframe, shoeBrand, priceShoe):
       df2 = dataframe[&quot;shoeBrand&quot;,&quot;priceShoe&quot;]
  </code></pre>
  <p>And this is how it would work:</p>
  <pre><code>print(dfFunction(df1, 1, 50)
  
       shoe     brand     price
  0   Jordan      1         50
  1   Kobe        1         50
  </code></pre>
  <p>So basically I want to create a new dataframe that takes the brand and price into consideration when creating a new dataframe using pandas.</p>