I have a relatively stupid question which I am not able to formulate very well (and I think it explains why I am not finding any answer)
I would like to calculate the mean, minimum, and maximum of a panda series in my dataframe for many variable (let's say age and weight)
dataframe.age.min()
dataframe.age.max()
dataframe.age.mean()
dataframe.weight.min()
dataframe.weight.max()
dataframe.weight.mean()
I would like to create some kind of loop, which would do something like:
list = ['age','weight']
for x in list:
min-"x" = dataframe.x.min()
max-"x" = dataframe.x.max()
mean-"x" = dataframe.x.mean()
I would like to have variables called min-age, max-age, mean-age
I don't understand how to define a function, and how to insert in the name min-"x" the name of my variable (x)...