Javascript Array Reduce Group By Pandas Documentation