The mode is the most frequent value in an attribute.
For example, the mode in the list [23; 26; 26; 26; 4; 7; 7; 98] is 26.
If the list is made up of numbers which have the same occurrence in the list, the lowest value is considered as mode. (e.g. in the list 2; 2; 2; 2; 1; 1; 1; 1; 100; 1000 the mode is 1, as it has the same occurrence of 2).
Function and parameters
mode(column, group, usemissing)
It identifies the column to which you want to apply the formula. The column parameter is mandatory.
It allows you to group the results by a certain column.
A Boolean which indicates whether missing values should be considered or not in the computation of the statistics. The default value, if not otherwise specified, is True.
The following example uses the HR-employee-attrition dataset.