cardillo / joinery

Data frames for Java
https://joinery.sh
GNU General Public License v3.0
695 stars 167 forks source link

Naiive Mode Algorithm and Get Col Index by Col Name #100

Open CodyWangYaohui opened 2 years ago

CodyWangYaohui commented 2 years ago

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.