rockfish.actions.replace
Attributes
Condition = Union[EqualizeCondition, TopKCondition, ThresholdCondition, SQLCondition]
module-attribute
Resample = Union[ValuesResample, SQLResample]
module-attribute
Classes
ReplaceConfig
Configuration class for the
Replace
action.
Attributes:
Name | Type | Description |
---|---|---|
field |
str
|
Field name for replacement. |
condition |
Condition
|
The |
resample |
Optional[Resample]
|
The |
seed |
Optional[int]
|
Seed for random number generator. |
Replace
Replace values in a selected field with given condition with new values from the resampled result.
Attributes:
Name | Type | Description |
---|---|---|
Config |
Alias for |
EqualizeCondition
EqualizeCondition class for the
condition
configuration.
Attributes:
Name | Type | Description |
---|---|---|
equalization |
bool
|
If |
TopKCondition
ThresholdCondition
SQLCondition
ValuesResample
SQLResample
SQLResample class for the
resample
configuration.
Attributes:
Name | Type | Description |
---|---|---|
query |
str
|
A SQL query string that returns 'values' and 'weights' columns. The 'values' column contains the values to replace, and the 'weights' column contains the weights for each value. The input dataset is always referred to as |