Interface DateTimeMapFunctions
-
- All Superinterfaces:
Column<LocalDateTime>,Comparator<LocalDateTime>,Iterable<LocalDateTime>,TemporalColumn<LocalDateTime>,TemporalMapFunctions<LocalDateTime>
- All Known Implementing Classes:
DateTimeColumn
public interface DateTimeMapFunctions extends TemporalMapFunctions<LocalDateTime>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DateColumndate()Returns a DateColumn containing the date portion of each dateTime in this DateTimeColumndefault IntColumndayOfMonth()default StringColumndayOfWeek()default IntColumndayOfWeekValue()default IntColumndayOfYear()default IntColumnhour()default StringColumnhourMinute()Returns a StringColumn with the year and week-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.DateTimeColumnlag(int n)Returns a column of the same type and size as the receiver, containing the receivers values offset by n.default DateTimeColumnlead(int n)Returns a column of the same type as the receiver, containing the receivers values offset -n For example if you lead a column containing 2, 3, 4 by 1, you get a column containing 3, 4, NA.default IntColumnminute()default IntColumnminuteOfDay()default StringColumnmonth()Returns a StringColumn containing the name of the month for each date/time in this columndefault IntColumnmonthValue()DateTimeColumnplus(long amountToAdd, ChronoUnit unit)default DateTimeColumnplusDays(long amountToAdd)default DateTimeColumnplusHours(long amountToAdd)default DateTimeColumnplusMicros(long amountToAdd)default DateTimeColumnplusMillis(long amountToAdd)default DateTimeColumnplusMinutes(long amountToAdd)default DateTimeColumnplusMonths(long amountToAdd)default DateTimeColumnplusSeconds(long amountToAdd)default DateTimeColumnplusWeeks(long amountToAdd)default DateTimeColumnplusYears(long amountToAdd)default IntColumnsecondOfDay()default TimeColumntime()Returns a TimeColumn containing the time portion of each dateTime in this DateTimeColumndefault LongColumntimeWindow(ChronoUnit unit, int n)default LongColumntimeWindow(ChronoUnit unit, int n, LocalDateTime start)Returns a column containing integers representing the nth group (0-based) that a date falls into.default IntColumnyear()default StringColumnyearDay()Returns a StringColumn with the year and day-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.default StringColumnyearMonth()Returns a StringColumn with the year and month from this column concatenated into a String that will sort lexicographically in temporal order.default StringColumnyearQuarter()Returns a StringColumn with the year and quarter from this column concatenated into a String that will sort lexicographically in temporal order.default StringColumnyearWeek()Returns a StringColumn with the year and week-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.-
Methods 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, equals, filter, first, getString, getUnformattedString, indexOf, inRange, interpolate, isEmpty, isMissing, isMissing, isNotMissing, last, lastIndexOf, 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
-
Methods inherited from interface tech.tablesaw.columns.temporal.TemporalColumn
appendInternal, get, getLongInternal
-
Methods inherited from interface tech.tablesaw.columns.temporal.TemporalMapFunctions
difference, differenceInDays, differenceInHours, differenceInMilliseconds, differenceInMinutes, differenceInSeconds, differenceInYears, emptyCopy, min, missingValues, temporalColumnName
-
-
-
-
Method Detail
-
hour
default IntColumn hour()
-
minuteOfDay
default IntColumn minuteOfDay()
-
secondOfDay
default IntColumn secondOfDay()
-
lead
default DateTimeColumn lead(int n)
Description copied from interface:ColumnReturns a column of the same type as the receiver, containing the receivers values offset -n For example if you lead a column containing 2, 3, 4 by 1, you get a column containing 3, 4, NA.- Specified by:
leadin interfaceColumn<LocalDateTime>
-
lag
DateTimeColumn lag(int n)
Description copied from interface:ColumnReturns a column of the same type and size as the receiver, containing the receivers values offset by n.For example if you lag a column containing 2, 3, 4 by 1, you get a column containing NA, 2, 3
- Specified by:
lagin interfaceColumn<LocalDateTime>
-
time
default TimeColumn time()
Returns a TimeColumn containing the time portion of each dateTime in this DateTimeColumn
-
monthValue
default IntColumn monthValue()
-
month
default StringColumn month()
Returns a StringColumn containing the name of the month for each date/time in this column
-
yearQuarter
default StringColumn yearQuarter()
Returns a StringColumn with the year and quarter from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
plus
DateTimeColumn plus(long amountToAdd, ChronoUnit unit)
- Specified by:
plusin interfaceTemporalMapFunctions<LocalDateTime>
-
plusYears
default DateTimeColumn plusYears(long amountToAdd)
- Specified by:
plusYearsin interfaceTemporalMapFunctions<LocalDateTime>
-
plusMonths
default DateTimeColumn plusMonths(long amountToAdd)
- Specified by:
plusMonthsin interfaceTemporalMapFunctions<LocalDateTime>
-
plusWeeks
default DateTimeColumn plusWeeks(long amountToAdd)
- Specified by:
plusWeeksin interfaceTemporalMapFunctions<LocalDateTime>
-
plusDays
default DateTimeColumn plusDays(long amountToAdd)
- Specified by:
plusDaysin interfaceTemporalMapFunctions<LocalDateTime>
-
plusHours
default DateTimeColumn plusHours(long amountToAdd)
- Specified by:
plusHoursin interfaceTemporalMapFunctions<LocalDateTime>
-
plusMinutes
default DateTimeColumn plusMinutes(long amountToAdd)
- Specified by:
plusMinutesin interfaceTemporalMapFunctions<LocalDateTime>
-
plusSeconds
default DateTimeColumn plusSeconds(long amountToAdd)
- Specified by:
plusSecondsin interfaceTemporalMapFunctions<LocalDateTime>
-
plusMillis
default DateTimeColumn plusMillis(long amountToAdd)
- Specified by:
plusMillisin interfaceTemporalMapFunctions<LocalDateTime>
-
plusMicros
default DateTimeColumn plusMicros(long amountToAdd)
- Specified by:
plusMicrosin interfaceTemporalMapFunctions<LocalDateTime>
-
yearMonth
default StringColumn yearMonth()
Returns a StringColumn with the year and month from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
yearDay
default StringColumn yearDay()
Returns a StringColumn with the year and day-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
hourMinute
default StringColumn hourMinute()
Returns a StringColumn with the year and week-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
yearWeek
default StringColumn yearWeek()
Returns a StringColumn with the year and week-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
date
default DateColumn date()
Returns a DateColumn containing the date portion of each dateTime in this DateTimeColumn
-
year
default IntColumn year()
-
dayOfWeek
default StringColumn dayOfWeek()
-
dayOfWeekValue
default IntColumn dayOfWeekValue()
-
dayOfYear
default IntColumn dayOfYear()
-
dayOfMonth
default IntColumn dayOfMonth()
-
timeWindow
default LongColumn timeWindow(ChronoUnit unit, int n, LocalDateTime start)
Returns a column containing integers representing the nth group (0-based) that a date falls into.Example: When Unit = ChronoUnit.DAY and n = 5, we form 5 day groups. a Date that is 2 days after the start is assigned to the first ("0") group. A day 7 days after the start is assigned to the second ("1") group.
- Parameters:
unit- A ChronoUnit greater than or equal to a minuten- The number of units in each group.start- The starting point of the first group; group boundaries are offsets from this point
-
minute
default IntColumn minute()
-
timeWindow
default LongColumn timeWindow(ChronoUnit unit, int n)
-
-