SeriesGroupBy { public Series<T> toSeries() { IntSeries index = SeriesConcat.intConcat(groupsIndex.values()); return ungrouped.select(index); } SeriesGroupBy(Series<T> ungrouped, Map<Object, IntSeries> groupsIndex); int size(); Collection<Object> getGroups(); boolean hasGroup(Object key); IntSeries getGroupIndex(Object key); Series<T> getGroup(Object key); Series<T> toSeries(); Series<R> agg(SeriesAggregator<? super T, R> aggregator); DataFrame aggMultiple(SeriesAggregator<? super T, ?>... aggregators);  }
@Test public void testToSeries() { SeriesGroupBy<String> gb = Series.forData("a", "b", "cd", "e", "fg") .group((String s) -> s.length()); new SeriesAsserts(gb.toSeries()).expectData("a", "b", "e", "cd", "fg"); }