environmentaltools.temporal.add_noise_to_array
- environmentaltools.temporal.add_noise_to_array(data: DataFrame, variables: list, remove: bool = False, filter_: str = None)[source]
Adds small random noise to the selected variable(s) in a time series for better estimations.
- Parameters:
data (pd.DataFrame) – Raw time series.
variable (list) – Variable(s) to apply noise to.
remove (bool) – If True, rows filtered by filter_ are removed from the output.
filter (str, optional) – Query string to filter the DataFrame before adding noise.
- Returns:
DataFrame with noise added to the selected variable(s).
- Return type:
pd.DataFrame