Question
Informatics Practices Question on types of functions
Which of the following function will display the average of each row of a dataframe named df?
A
df.mean()
B
df.mean(axis=1)
C
df.mean(axis=0)
D
df.mean(AXIS = 0)
Answer
df.mean(axis=1)
Explanation
Solution
The correct option is(B):df.mean(axis=1)