I want to be able to create a cross table/table/dataframe (what ever the name) like this:
____________________
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)
____________________
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.
What I get now is as below:
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)
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.