Commit 25695c9d authored by Christophe Benz's avatar Christophe Benz
Browse files

Filtered series name is original name + " (filtered)"

parent 96135ab7
Pipeline #72270 passed with stage
in 33 seconds
......@@ -333,7 +333,8 @@ def normalize_editor_series(series, dbnomics_series):
"""Adapt Time Series Editor series attributes to ease DataFrame construction."""
series = normalize_period(series)
series = normalize_value(series)
return {
series = {
**without_keys(series, keys={"frequency"}),
"@frequency": series["frequency"],
"provider_code": dbnomics_series["provider_code"],
......@@ -342,6 +343,12 @@ def normalize_editor_series(series, dbnomics_series):
"series_code": "{}_filtered".format(dbnomics_series["series_code"]),
series_name = dbnomics_series.get("series_name")
if series_name:
series["series_name"] = "{} (filtered)".format(series_name)
return series
def normalize_period(series):
"""Keep original period and convert str to datetime. Modifies `series`"""
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment