Group Array Javascript Append W3schools Python Pandas