ByRowSeries extends ObjectSeries<Object> { @Override public Object get(int index) { DataFrame source = this.source; if (source != null) { int row = index / width; int column = index % width; return source.getColumn(column).get(row); } return materialize().get(index); } ByRowSeries(DataFrame source); @Override int size(); @Override Object get(int index); @Override void copyTo(Object[] to, int fromOffset, int toOffset, int len); @Override Series<Object> materialize(); @Override Series<Object> fillNulls(Object value); @Override Series<Object> fillNullsFromSeries(Series<?> values); @Override Series<Object> fillNullsBackwards(); @Override Series<Object> fillNullsForward();  }
@Test public void testGet() { DataFrame df = DataFrame.newFrame("a", "b").foldByRow( "a1", "b1", "a2", "b2"); ByRowSeries s = new ByRowSeries(df); assertEquals("a1", s.get(0)); assertEquals("b1", s.get(1)); assertEquals("a2", s.get(2)); assertEquals("b2", s.get(3)); }