class DataFrameBuilder {

    public <T> DataFrame objectsToRows(Iterable<T> objects, Function<T, Object[]> rowMapper) {
        DataFrameByRowBuilder byRowBuilder = new DataFrameByRowBuilder(columnsIndex);
        objects.forEach(o -> byRowBuilder.addRow(rowMapper.apply(o)));
        return byRowBuilder.create();
    }

    protected  DataFrameBuilder(Index columnsIndex);

}