public interface DateSeries extends DataFrame
DataFrame. A DateSeries is a
DataFrame with exactly two columns:
ColumnType.DATE.
ColumnType.DOUBLE.
Row in a time series can be thought of as a (date,value)
point.| Modifier and Type | Method and Description |
|---|---|
DateSeries |
append(DateSeries df)
Appends the specified
DateSeries to this one by calling
Column.append(Column) on both the key and value columns, and keeping
the meta-data from this dataframe. |
Map<LocalDate,Double> |
asMap()
Returns an immutable
Map view of this time series. |
DateSeries |
empty()
Returns an empty
DateSeries. |
DateSeries |
filter(Predicate<Row> criteria)
Returns a
DateSeries containing the points which pass the specified
Predicate. |
default LocalDate |
getDate(int index)
Returns the date for the point at the specified index.
|
default double |
getValue(int index)
Returns the value for the point at the specified index.
|
DateSeries |
head()
Returns a
DateSeries containing the first 10 points from this time
series, or this time series if it contains fewer than 10 points. |
DateSeries |
head(int count)
Returns a
DateSeries containing the first count points from
this time series, or this time series if it contains fewer than count
points. |
DateSeries |
headTo(LocalDate toKey)
Returns a
DateSeries containing the points with dates strictly less
than toKey. |
DateSeries |
sampleN(int sampleSize)
Returns a
DateSeries containing sampleSize points selected at
random. |
DateSeries |
sampleX(double proportion)
Returns a
DateSeries containing size()*proportion points
selected at random. |
DateSeries |
subSeries(int fromIndex,
int toIndex)
Returns a
DateSeries containing the points between the specified
fromIndex, inclusive, and toIndex, exclusive (if
fromIndex and toIndex are equal, the returned time series
is empty). |
DateSeries |
subSeries(LocalDate fromKey,
boolean fromInclusive,
LocalDate toKey,
boolean toInclusive)
|
DateSeries |
subSeries(LocalDate fromKey,
LocalDate toKey)
Returns a
DateSeries containing the points with dates are greater
than or equal to fromKey and strictly less than toKey. |
DateSeries |
tail()
Returns a
DateSeries containing the last 10 points from this time
series, or this time series if it contains fewer than 10 points. |
DateSeries |
tail(int count)
Returns a
DateSeries containing the last count points from
this dataframe, or this time series if it contains fewer than count
points. |
DateSeries |
tailFrom(LocalDate fromKey)
Returns a
DateSeries containing the points with dates greater than or
equal to fromKey. |
default DateSeries |
toDateSeries(int columnIndex)
Returns this time series
|
default DateSeries |
toDateSeries(String columnName)
Returns this time series
|
DateSeries |
transform(DateSeries series,
DoubleBinaryOperator op)
Joins this time series with the specifies series, and combines their values
point-wise using the specified operation.
|
DateSeries |
transform(DoubleUnaryOperator op)
Returns a new time series where the values have been transformed by the
provided operation.
|
default int |
yyyymmdd(int index)
Returns the yyyymmdd-format date for the point at the specified index.
|
append, append, booleanColumn, booleanColumn, column, column, columnCount, columnIndex, columnMap, columnName, columnNames, columns, columnType, columnType, columnTypes, copy, cursor, cursor, dateColumn, dateColumn, dateTimeColumn, dateTimeColumn, decimalColumn, decimalColumn, deriveColumn, deriveColumn, deriveColumn, deriveColumn, deriveColumn, deriveColumn, doubleColumn, doubleColumn, dropColumns, dropColumns, dropColumns, equals, filterNulls, floatColumn, floatColumn, get, get, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getDate, getDate, getDateTime, getDateTime, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getOrDefaultDouble, getOrDefaultDouble, getOrDefaultFloat, getOrDefaultFloat, getOrDefaultInt, getOrDefaultInt, getOrDefaultLong, getOrDefaultLong, getOrDefaultShort, getOrDefaultShort, getShort, getShort, getString, getString, hasKeyColumn, headTo, indexOrganize, indexOrganize, intColumn, intColumn, isNull, isNull, join, join, joinLeftOneToMany, joinManyToOne, joinOneToMany, keyColumnIndex, keyColumnName, keyColumnType, longColumn, longColumn, selectColumns, selectColumns, selectColumns, shortColumn, shortColumn, spliterator, stringColumn, stringColumn, subFrame, subFrameByValue, subFrameByValue, tailFrom, toMap, toMap, withColumn, withColumns, withColumns, withColumns, withKeyColumn, withKeyColumn, writeCsvTo, writeCsvTo, writeTo, writeTo, writeTo, writeTo, yyyymmdd, yyyymmddadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, subList, toArray, toArrayparallelStream, removeIf, streamDateSeries transform(DoubleUnaryOperator op)
The resulting time series will have the same column names.
op - - the operation used to transform the valuesDateSeries transform(DateSeries series, DoubleBinaryOperator op)
The resulting time series will have the same column names as this one.
series - - the series to be joined with this oneop - - the operation used to combine the valuesMap<LocalDate,Double> asMap()
Map view of this time series.Map view of this time series.default LocalDate getDate(int index)
index - - the point/row indexIndexOutOfBoundsException - if index is negative or is not less
than List.size()default int yyyymmdd(int index)
index - - the point/row indexIndexOutOfBoundsException - if index is negative or is not less
than List.size()default double getValue(int index)
index - - the point/row indexIndexOutOfBoundsException - if index is negative or is not less
than List.size()default DateSeries toDateSeries(int columnIndex)
toDateSeries in interface DataFramecolumnIndex - - ignoreddefault DateSeries toDateSeries(String columnName)
toDateSeries in interface DataFramecolumnName - - ignoredDateSeries sampleN(int sampleSize)
DateSeries containing sampleSize points selected at
random.sampleN in interface DataFramesampleSize - - the number of points to sample from this time seriessampleSize points selected at random.IndexOutOfBoundsException - if sampleSize is negative or is
greater than #size()DateSeries sampleX(double proportion)
DateSeries containing size()*proportion points
selected at random.DateSeries filter(Predicate<Row> criteria)
DateSeries containing the points which pass the specified
Predicate.DateSeries append(DateSeries df)
DateSeries to this one by calling
Column.append(Column) on both the key and value columns, and keeping
the meta-data from this dataframe.df - - the time series to be appended to this oneDateSeries resulting from appended the specified time
series to this one.DateSeries head(int count)
DateSeries containing the first count points from
this time series, or this time series if it contains fewer than count
points.DateSeries empty()
DateSeries. The resulting time series will have the
same meta-data (column names) as this one, but the key and value columns will
be empty.DateSeries head()
DateSeries containing the first 10 points from this time
series, or this time series if it contains fewer than 10 points.DateSeries tail(int count)
DateSeries containing the last count points from
this dataframe, or this time series if it contains fewer than count
points.DateSeries tail()
DateSeries containing the last 10 points from this time
series, or this time series if it contains fewer than 10 points.DateSeries subSeries(int fromIndex, int toIndex)
DateSeries containing the points between the specified
fromIndex, inclusive, and toIndex, exclusive (if
fromIndex and toIndex are equal, the returned time series
is empty).fromIndex - - index of the lowest point (inclusive)toIndex - - index of the highest point (exclusive)DateSeries containing the points between the specified
fromIndex, inclusive, and toIndex, exclusiveIndexOutOfBoundsException - if either index is negative or is greater
than List.size(), or if toIndex
is less than fromIndexDateSeries headTo(LocalDate toKey)
DateSeries containing the points with dates strictly less
than toKey.toKey - high endpoint (exclusive) of the dates in the returned time
seriestoKey.NullPointerException - if toKey is nullDateSeries tailFrom(LocalDate fromKey)
DateSeries containing the points with dates greater than or
equal to fromKey.fromKey - low endpoint (inclusive) of the dates in the returned time
seriesfromKey.NullPointerException - if fromKey is nullDateSeries subSeries(LocalDate fromKey, LocalDate toKey)
DateSeries containing the points with dates are greater
than or equal to fromKey and strictly less than toKey.fromKey - low endpoint (inclusive) of the dates in the returned time
seriestoKey - high endpoint (exclusive) of the dates in the returned time
seriesfromKey and strictly less than toKey.NullPointerException - if either key is nullDateSeries subSeries(LocalDate fromKey, boolean fromInclusive, LocalDate toKey, boolean toInclusive)
DateSeries containing the points with dates between
fromKey and toKey. If fromKey and toKey are
equal, the resulting time series is empty unless fromInclusive and toInclusive are both true.fromKey - low endpoint (inclusive) of the dates in the returned
time seriesfromInclusive - true if the low endpoint is to be included in the resulttoKey - high endpoint (exclusive) of the dates in the returned
time seriestoInclusive - true if the high endpoint is to be included in the
resultfromKey and toKey.NullPointerException - if either key is nullCopyright © 2020. All rights reserved.