#[non_exhaustive]pub struct TimeSeriesTransformations {
pub filling: Option<HashMap<String, HashMap<FillingType, String>>>,
pub aggregation: Option<HashMap<String, AggregationTransformationValue>>,
}
Expand description
Transformations allowed on the dataset. Supported transformations are Filling
and Aggregation
. Filling
specifies how to add values to missing values in the dataset. Aggregation
defines how to aggregate data that does not align with forecast frequency.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.filling: Option<HashMap<String, HashMap<FillingType, String>>>
A key value pair defining the filling method for a column, where the key is the column name and the value is an object which defines the filling logic. You can specify multiple filling methods for a single column.
The supported filling methods and their corresponding options are:
-
frontfill
:none
(Supported only for target column) -
middlefill
:zero
,value
,median
,mean
,min
,max
-
backfill
:zero
,value
,median
,mean
,min
,max
-
futurefill
:zero
,value
,median
,mean
,min
,max
To set a filling method to a specific value, set the fill parameter to the chosen filling method value (for example "backfill" : "value"
), and define the filling value in an additional parameter prefixed with "_value". For example, to set backfill
to a value of 2
, you must include two parameters: "backfill": "value"
and "backfill_value":"2"
.
aggregation: Option<HashMap<String, AggregationTransformationValue>>
A key value pair defining the aggregation method for a column, where the key is the column name and the value is the aggregation method.
The supported aggregation methods are sum
(default), avg
, first
, min
, max
.
Aggregation is only supported for the target column.
Implementations§
source§impl TimeSeriesTransformations
impl TimeSeriesTransformations
sourcepub fn filling(&self) -> Option<&HashMap<String, HashMap<FillingType, String>>>
pub fn filling(&self) -> Option<&HashMap<String, HashMap<FillingType, String>>>
A key value pair defining the filling method for a column, where the key is the column name and the value is an object which defines the filling logic. You can specify multiple filling methods for a single column.
The supported filling methods and their corresponding options are:
-
frontfill
:none
(Supported only for target column) -
middlefill
:zero
,value
,median
,mean
,min
,max
-
backfill
:zero
,value
,median
,mean
,min
,max
-
futurefill
:zero
,value
,median
,mean
,min
,max
To set a filling method to a specific value, set the fill parameter to the chosen filling method value (for example "backfill" : "value"
), and define the filling value in an additional parameter prefixed with "_value". For example, to set backfill
to a value of 2
, you must include two parameters: "backfill": "value"
and "backfill_value":"2"
.
sourcepub fn aggregation(
&self,
) -> Option<&HashMap<String, AggregationTransformationValue>>
pub fn aggregation( &self, ) -> Option<&HashMap<String, AggregationTransformationValue>>
A key value pair defining the aggregation method for a column, where the key is the column name and the value is the aggregation method.
The supported aggregation methods are sum
(default), avg
, first
, min
, max
.
Aggregation is only supported for the target column.
source§impl TimeSeriesTransformations
impl TimeSeriesTransformations
sourcepub fn builder() -> TimeSeriesTransformationsBuilder
pub fn builder() -> TimeSeriesTransformationsBuilder
Creates a new builder-style object to manufacture TimeSeriesTransformations
.
Trait Implementations§
source§impl Clone for TimeSeriesTransformations
impl Clone for TimeSeriesTransformations
source§fn clone(&self) -> TimeSeriesTransformations
fn clone(&self) -> TimeSeriesTransformations
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TimeSeriesTransformations
impl Debug for TimeSeriesTransformations
source§impl PartialEq for TimeSeriesTransformations
impl PartialEq for TimeSeriesTransformations
source§fn eq(&self, other: &TimeSeriesTransformations) -> bool
fn eq(&self, other: &TimeSeriesTransformations) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TimeSeriesTransformations
Auto Trait Implementations§
impl Freeze for TimeSeriesTransformations
impl RefUnwindSafe for TimeSeriesTransformations
impl Send for TimeSeriesTransformations
impl Sync for TimeSeriesTransformations
impl Unpin for TimeSeriesTransformations
impl UnwindSafe for TimeSeriesTransformations
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more