Transpose columns in table
kdb k, 101 bytes
1@&quot;\n&quot;/:{&quot;\n&quot;/:{&quot; &quot;/:(r@&amp;{~#&amp;x=a}'!#r),(,$1+a@x),,c@x}'!#c::(r::&quot; &quot;\:x)@a::-1+.:'.z.x}'-1_&quot;\n&quot;\:0::0;

Me: (reads the word &quot;transpose&quot; in the title) K will be perfect for this! It'll kick everything else's hind!
20 minutes and 101 bytes later
Me: Idiot.