transpose method : transpose « Array « Ruby






transpose method


d2 = [ ["January", 2007], ["February", 2007], ["March", 2007] ]

d2.transpose # => => [["January", "February", "March"], [2007, 2007, 2007]]

 

Related examples in the same category