Instead of trying to print the column-major format, we just transpose it
177736
function(results) {
        var rows = [];
        var cols = results.columns;
        
        var mapFirst = function(col) { return col.shift(); };
        
        while(cols.length > 0 && cols[0].length > 0) {
            rows.push(cols.map(mapFirst));   
        }
        
        results.rows = rows;
        return results;
    }
1216686
function transpose(matrix) {
                var resultMatrix = new Array(matrix[0].length);
                for (var i = 0; i < resultMatrix.length; ++i) {
                    resultMatrix[i] = new Array(matrix.length);
                }

                for (i = 0; i < matrix.length; ++i) {
                    for (var j = 0; j < matrix[0].length; ++j) {
                        resultMatrix[j][i] = matrix[i][j];
                    }
                }

                return resultMatrix;
            }
805305
@Override
	public String convert(SIFInteraction inter)
	{
		String s = inter.toString();

		for (OutputColumn column : columns)
		{
			s += "\t" + column.getColumnValue(inter);
		}

		return s;
	}
404393
def transpose(self, *args, **kwargs):
        
        nv.validate_transpose(args, kwargs)
        return self._constructor(
            self.values.T, index=self.columns, columns=self.index,
            default_fill_value=self._default_fill_value,
            default_kind=self._default_kind).__finalize__(self)
1185788
def column_to_intermediary(col, type_formatter=format_type):
    
    return Column(
        name=col.name,
        type=type_formatter(col.type),
        is_key=col.primary_key,
    )
1206051
public function transpose()
	{
		$array	= array();
		$rowNumber		= $this->getRowNumber();
		$columnNumber	= $this->getColumnNumber();
		for( $row = 0; $row < $rowNumber; $row++ )
			for( $column = 0; $column < $columnNumber; $column++ )
				$array[$column][$row]	= $this->values[$row][$column];
		$this->rowNumber	= $columnNumber;
		$this->columnNumber	= $rowNumber;
		$this->values		= $array;
	}
371235
private static String transColumnNameToFieldName(String colName) {
		if (StrUtils.isEmpty(colName))
			return colName;
		if (!colName.contains("_"))
			return StrUtils.toLowerCaseFirstOne(colName);
		StringBuilder sb = new StringBuilder();
		char[] chars = colName.toLowerCase().toCharArray();
		for (int i = 0; i < chars.length; i++) {
			char c = chars[i];
			if (c == '_')
				continue;
			if ((i > 0) && (chars[i - 1]) == '_' && sb.length() > 0)
				sb.append(Character.toUpperCase(c));
			else
				sb.append(c);
		}
		return sb.toString();
	}
911651
function printColumns(heading, data) {
  const columns = columnify(data, {});
  const spacer = EOL + EOL;

  process.stdout.write(heading);
  process.stdout.write(spacer);

  if (columns) {
    process.stdout.write(columns);
    process.stdout.write(spacer);
  }
}
1316854
def transpose(table):
    
    t = []
    for i in range(0, len(table[0])):
        t.append([row[i] for row in table])
    return t
1319612
function camelCaseToUnderscoreMap(columns) {
    var map = {};
    for (var i = 0; i < columns.length; i++)
        map[columns[i]] = toUnderscore(columns[i]);
    return map;
}
1265051
def transpose(self) -> 'TextDiagramDrawer':
        """"""
        out = TextDiagramDrawer()
        out.entries = {(y, x): _DiagramText(v.transposed_text, v.text)
                       for (x, y), v in self.entries.items()}
        out.vertical_lines = [_VerticalLine(*e)
                              for e in self.horizontal_lines]
        out.horizontal_lines = [_HorizontalLine(*e)
                                for e in self.vertical_lines]
        out.vertical_padding = self.horizontal_padding.copy()
        out.horizontal_padding = self.vertical_padding.copy()
        return out
560734
def to_even_columns(data, headers=None):
    
    result = ''
    col_width = max(len(word) for row in data for word in row) + 2  # padding
    if headers:
        header_width = max(len(word) for row in headers for word in row) + 2
        if header_width > col_width:
            col_width = header_width

        result += "".join(word.ljust(col_width) for word in headers) + "\n"
        result += '-' * col_width * len(headers) + "\n"

    for row in data:
        result += "".join(word.ljust(col_width) for word in row) + "\n"
    return result
613480
def ColumnToIndex (col):
        """"""
        ndx = 0
        for c in col:
                ndx = ndx * 26 + ord(c.upper()) - 64
        return ndx
665922
public static void convert(DMatrix input , FMatrix output ) {
        if( input.getNumRows() != output.getNumRows() )
            throw new IllegalArgumentException("Number of rows do not match");
        if( input.getNumCols() != output.getNumCols() )
            throw new IllegalArgumentException("Number of columns do not match");

        for( int i = 0; i < input.getNumRows(); i++  ) {
            for( int j = 0; j < input.getNumCols(); j++ ) {
                output.unsafe_set(i,j, (float)input.unsafe_get(i,j));
            }
        }
    }
1191323
function (columns) {
        var i, j, k,
            totalCol = 0,
            flag = [];

        for (i = 0; i < columns[0].length; i++) {
            totalCol += columns[0][i].colspan || 1;
        }

        for (i = 0; i < columns.length; i++) {
            flag[i] = [];
            for (j = 0; j < totalCol; j++) {
                flag[i][j] = false;
            }
        }

        for (i = 0; i < columns.length; i++) {
            for (j = 0; j < columns[i].length; j++) {
                var r = columns[i][j],
                    rowspan = r.rowspan || 1,
                    colspan = r.colspan || 1,
                    index = $.inArray(false, flag[i]);

                if (colspan === 1) {
                    r.fieldIndex = index;
                    // when field is undefined, use index instead
                    if (typeof r.field === 'undefined') {
                        r.field = index;
                    }
                }

                for (k = 0; k < rowspan; k++) {
                    flag[i + k][index] = true;
                }
                for (k = 0; k < colspan; k++) {
                    flag[i][index + k] = true;
                }
            }
        }
    }
1125817
function (file, writeOptions) {
  writeOptions = writeOptions || {};
  file = formattingPreflight(file, 'csv');
  try {
    return csvFormat(file, writeOptions.columns);
  } catch (err) {
    parseError('csv');
  }
}
804097
def printCols(strlist,cols=5,width=80):

    """"""

    # This may exist somewhere in the Python standard libraries?
    # Should probably rewrite this, it is pretty crude.

    nlines = (len(strlist)+cols-1)//cols
    line = nlines*[""]
    for i in range(len(strlist)):
        c, r = divmod(i,nlines)
        nwid = c*width//cols - len(line[r])
        if nwid>0:
            line[r] = line[r] + nwid*" " + strlist[i]
        else:
            line[r] = line[r] + " " + strlist[i]
    for s in line:
        print(s)