Package tech.tablesaw.api
Interface CategoricalColumn<T>
- All Superinterfaces:
Column<T>
,Comparator<T>
,Iterable<T>
- All Known Implementing Classes:
AbstractStringColumn
,BooleanColumn
,DateColumn
,DateTimeColumn
,InstantColumn
,IntColumn
,LongColumn
,ShortColumn
,StringColumn
,TextColumn
,TimeColumn
A column type that can be summarized, or serve as a grouping variable in cross tabs or other
aggregation operations.
The column data is generally discrete, however NumberColumn implements CategoricalColumn so that it can be used to summarize when it contains ints. If you use it to summarize over a large range of floating point numbers, you will likely run out of memory.
Supporting subtypes include: - StringColumn - BooleanColumn - DateColumn, - etc
DateTimeColumn is not included. TimeColumn can be converted to ints without loss of data, so it does implement this interface
-
Method Summary
Modifier and TypeMethodDescriptiondefault Table
Returns a count of the number of elements in each category (i.e., the number of repetitions of each value) TODO: This needs to be well tested, especially for IntColumnMethods inherited from interface tech.tablesaw.columns.Column
allMatch, anyMatch, append, append, append, appendCell, appendCell, appendMissing, appendObj, asBytes, asList, asObjectArray, asSet, asStringColumn, byteSize, clear, columnWidth, contains, copy, count, count, countMissing, countUnique, emptyCopy, emptyCopy, equals, filter, first, get, getString, getUnformattedString, indexOf, inRange, interpolate, isEmpty, isMissing, isMissing, isNotMissing, lag, last, lead, map, map, mapInto, max, max, min, min, name, noneMatch, parser, print, reduce, reduce, removeMissing, rolling, rowComparator, sampleN, sampleX, set, set, set, set, set, set, setMissing, setMissingTo, setName, setParser, size, sortAscending, sortDescending, sorted, subset, summary, title, type, unique, valueHash, where
Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
countByCategory
Returns a count of the number of elements in each category (i.e., the number of repetitions of each value) TODO: This needs to be well tested, especially for IntColumn
-