I was going through the Apriori algorithm and was trying to solve it by using user defined function. The code is available on Github -: https://gist.github.com/marcelcaraciolo/1