Tuesday 31 March 2020

TableSaw: max: Find maximum value in a column

‘max’ function returns the maximum value in 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 maximumValue = numbersColumn.max();
  

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

Output
maximumValue : 45.0

Previous                                                    Next                                                    Home

No comments:

Post a Comment