Function opendp::transformations::then_df_cast_default
source · pub fn then_df_cast_default<TK, TIA, TOA, M>(
column_name: TK
) -> PartialTransformation<DataFrameDomain<TK>, DataFrameDomain<TK>, M, M>where
TK: Hashable,
TIA: Primitive,
TOA: Primitive + RoundCast<TIA>,
M: DatasetMetric,
(DataFrameDomain<TK>, M): MetricSpace,
(VectorDomain<AtomDomain<TIA>>, M): MetricSpace,
(VectorDomain<AtomDomain<TOA>>, M): MetricSpace,
Expand description
Make a Transformation that casts the elements in a column in a dataframe from type TIA
to type TOA
.
If cast fails, fill with default.
TIA | TIA::default() |
---|---|
float | 0. |
int | 0 |
string | "" |
bool | false |
Arguments
column_name
- column name to be transformed
Generics
TK
- Type of the column nameTIA
- Atomic Input Type to cast fromTOA
- Atomic Output Type to cast into