As you could see there's no lib object/class for us to carry out mode like org.apache.commons.math3.stat.descriptive.moment.Mean()
or
org.apache.commons.math3.stat.descriptive.rank.Median(),
we just implemented a mode algorithm by simply going through each element inside the column and perform something like counter in py to collect the frequency of each component and finally render out the element with highest frequency of each column in a 1*n array in form of DataFrame.
As you could see there's no lib object/class for us to carry out mode like org.apache.commons.math3.stat.descriptive.moment.Mean() or org.apache.commons.math3.stat.descriptive.rank.Median(), we just implemented a mode algorithm by simply going through each element inside the column and perform something like counter in py to collect the frequency of each component and finally render out the element with highest frequency of each column in a 1*n array in form of DataFrame.