Obtain Large or Small Values¶
The Obtain Small or Large Value task has the following two sub-tasks:
- The small function fetches numeric values based on their position in a list ranked by value. In other words, it can retrieve “nth smallest” values - smallest value, 2nd smallest value, 3rd smallest value, and so on.
- The large function fetches numeric values based on their position in a list reverse ranked by value. In other words, it can retrieve “nth largest” values - largest value, 2nd largest value, 3rd largest value, and so on.
Let us start with the following sample data:
Let us suppose you want to know what were the highest marks achieved by the students in any of the subjects. Complete the following steps to achieve this:
- Open Data Preparation menu and click on Numeric Functions
- Select Obtain Large or Small Values
- Select all the columns.
- Change the smallest to largest.
- Enter the name Highest into the new column name.
- Click APPLY.
The data appears as shown below:
The following options are supported.
- Column List: The list of numeric columns to compare.
- Control Value: The numeric value used as a threshold. This is enabled when at least one column is enabled.
- N: the index of value to extract from the list. First, second and so on.
- Small or Large: The nature of the value to extract from the list.