-
Notifications
You must be signed in to change notification settings - Fork 80
Add dataframe format converter to plot_holidays
#702
Comments
alex-hse-repository
changed the title
Change dataframe format in
Add dataframe format converter to May 20, 2022
plot_holidays
plot_holidays
Why not just make this format default to the library? |
Actually |
I think it should be done like this: import pandas as pd
from etna.datasets import TSDataset
from etna.analysis import plot_holidays
ts = TSDataset(data_in_etna_format, freq="D")
new_years = pd.DataFrame({
'holiday': 'New Year',
'ds': pd.to_datetime(['2015-01-01', '2016-01-01', '2017-01-01', '2018-01-01', '2019-01-01']),
'lower_window': 10,
'upper_window': 10,
})
holidays = pd.concat((new_years,))
plot_holidays(ts, holidays=holidays, segments=["Finland_KaggleMart_Kaggle Hat"], columns_num=1, figsize=(10,7)) |
9 tasks
However I suggest we add converter function from old etna format to current (prophet) format. |
Repository owner
moved this from In Review
to Done
in etna board
May 31, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🚀 Feature Request
Add dataframe format converter to
plot_holidays
Motivation
Make method more convenient for parameters selection
Proposal
prophet_to_etna(holidays: pd.Dataframe) -> pd.Dataframe
Convert the format of
holidays
dataframe from Prophet see to the format ofplot_holidays
etna_to_prophet(holidays: pd.Dataframe) -> pd.Dataframe
Do it vice versa
Test cases
No response
Alternatives
No response
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: