title: Python/Pandas: How to create a table of results with new variables and values calculated from an existing dataframe
body: <p>I want to be able to create a cross table/table/dataframe (what ever the name) like this:</p>
  
  <pre><code>____________________      
  Performance  "value" (This value must come from a X vector, which has a formula to go to dataset, calculate and return this value)
  ____________________
  LTFU         "value" (This value must come from a y vector, which has a formula to go to dataset, calculate and return this value)
  ____________________
  </code></pre>
  
  <p>Please, note that Performance and LTFU values are generated from a function applied to a .csv dataset in python. Performance and LTFU don't exist in the .csv dataset, both should be created just to allow me do a summary of performance.</p>
  
  <p>What I get now is as below:</p>
  
  <pre><code>import pandas as pd
  performance=pd.read_csv("https://www.dropbox.com/s/08kuxi50d0xqnfc/demo.csv?dl=1")
  
  x=performance["idade"].sum()
  y=performance["idade"].mean()
  
  l = "Performance"
  k = "LTFU"
  
  def test(y):
  return pd.DataFrame({'a':y, 'b':x})
  
  test([l,k])
  
           a        b
  0   Performance   x vector value here (it shows 1300, it is correct)
  1   LTFU          y vector value here (it shows 1300, it is wrong, it should show 14.130434782608695 instead, according to the instruction of y vector)
  </code></pre>
  
  <p>You can copy and paste the above code to your python IDE and test and then return with your solution to me.
  Please, show me an example with the table results as I want.</p>