Commit 15878e80 authored by Niklas Selke's avatar Niklas Selke
Browse files

Finished the data deseasonalization code.

parent 530e878b
......@@ -22,4 +22,8 @@ def deseasonalize(data):
pd.DataFrame({"value": data["value"], "month": data.index.month})
).fit(method="qr").predict(pd.DataFrame({"month": range(1, 13)}))
return data
idx = data.index
return pd.DataFrame({
"value": data["value"].values - seasonal_cycle[idx.month-1].values,
"datetime": (idx.year-2000)*12 + idx.month
Supports Markdown
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