I came across this question about pandas: Replacing loop with efficient pandas dataframe operation
It applies several statistical models to a dataframe and extracts some model statistics (intercept, slope, r-square, sample size - very common measures).
The question basically asks if there is an alternative method exists without going over the loop (many pandas questions ask the same thing: how can I do this without a loop).
The answer, if yes, wouldn't be too long to this question. It would be:
df.somefunction().someotherfunction()....
And a few similar lines.
There would not be many possible answers too, as the question's scope is very limited to start with. How many pandas solutions can you have?
I understand the question can be improved by defining the table structure, making the code more readable, etc. but what is being asked seems very clear to me.
Apparently at least five other people disagree with me so I'd like to learn what is the expected content for a question like this.