Index implements Iterable<String> { public Series<String> toSeries() { return Series.forData(labels); } protected  Index(String... labels); static Index forLabels(Class<E> columns); static Index forLabels(String... labels); static Index forLabels(Series<String> labels); static Index forLabelsDeduplicate(String... labels); @Override Iterator<String> iterator(); Index rename(UnaryOperator<String> renameFunction); Index rename(Map<String, String> oldToNewLabels); Index rename(String... newLabels); Index addLabels(String... extraLabels); Index selectPositions(IntSeries positions); Index selectPositions(int... positions); Index rangeOpenClosed(int fromInclusive, int toExclusive); Index selectLabels(String... labels); Index selectLabels(Predicate<String> includeCondition); Index dropLabels(String... labels); Index dropLabels(Predicate<String> labelCondition); String[] getLabels(); String getLabel(int pos); int size(); int position(String label); boolean hasLabel(String label); @Override boolean equals(Object obj); Index sample(int size); Index sample(int size, Random random); Series<String> toSeries(); @Override String toString();  }
@Test public void testToSeries() { Series<String> s = Index.forLabels("a", "b", "c", "d").toSeries(); new SeriesAsserts(s).expectData("a", "b", "c", "d"); }