Tuesday, 31 March 2020

TableSaw: min: Find minimum value in a column

‘min’ function return the minimum value from a column.

App.java
package com.sample.app;

import tech.tablesaw.api.IntColumn;

public class App {

 public static void main(String args[]) {
  int[] numbers = { 23, 45, 6, 32, 1, 43 };
  
  IntColumn numbersColumn = IntColumn.create("My Numbers", numbers);
  double minimumValue = numbersColumn.min();
  

  System.out.println("minimumValue : " + minimumValue);
 }
}

Output
minimumValue : 1.0

Previous                                                    Next                                                    Home

No comments:

Post a Comment