How to get MEAN of two columns

I have two columns in my dataset and I want the third column as a mean of two columns.
I have achieved this result by writing code in java.
But I wanted to calculated this using some ‘commons-math’ library. But I am unable to find any specific library for this.
Below I have attached the link of the commons-math library for the reference.
http://commons.apache.org/proper/commons-math/

Can anyone know which class should I have to used for achieving this result…

https://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/descriptive/moment/Mean.html

1 Like