apply_smoothing API Reference
geoloop.utils.helpers.apply_smoothing
apply_smoothing(
df: DataFrame,
column: str,
smoothing: int | str | None = None,
outdir: Path | None = None,
prefix: str = "data",
) -> pd.DataFrame
Apply smoothing to a timeseries column in a dataframe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Input dataframe (must contain |
required |
column
|
str
|
Column name to smooth (e.g. "m_flow" or "Q"). |
required |
smoothing
|
int | str | None
|
|
None
|
outdir
|
Path
|
Directory to save smoothed CSV (for "D" or "M"). |
None
|
prefix
|
str
|
Prefix for the output filename ("flow" or "load"). |
'data'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with smoothed column. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |