class DataFrameBuilder {

    public DataFrame foldIntByColumn(int padWith, int... data) {

        FoldByColumnGeometry g = byColumnGeometry(data.length);

        int[][] columnarData = new int[g.width][g.height];

        for (int i = 0; i < g.fullColumns; i++) {
            System.arraycopy(data, i * g.height, columnarData[i], 0, g.height);
        }

        if (g.isLastColumnPartial()) {
            System.arraycopy(data, g.cellsInFullColumns(), columnarData[g.fullColumns], 0, g.partialColumnHeight);

            if (padWith != 0) {
                Arrays.fill(columnarData[g.fullColumns], g.partialColumnHeight, g.height, padWith);
            }
        }

        Series[] series = new Series[g.width];

        for (int i = 0; i < g.width; i++) {
            series[i] = new IntArraySeries(columnarData[i]);
        }

        return new ColumnDataFrame(columnsIndex, series);
    }

    protected  DataFrameBuilder(Index columnsIndex);

}