-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
Codecov Report
@@ Coverage Diff @@
## master #241 +/- ##
==========================================
+ Coverage 86.43% 86.49% +0.06%
==========================================
Files 89 89
Lines 4232 4244 +12
==========================================
+ Hits 3658 3671 +13
+ Misses 574 573 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks 👍🏼
could you please add test that checks smth like
assert (df == TSDataset.to_flatten(TSDataset.to_dataset(df))).all().all()
etna/datasets/tsdataset.py
Outdated
3 2021-06-04 segment_0 1.00 | ||
4 2021-06-05 segment_0 1.00 | ||
>>> df_ts_format = TSDataset.to_dataset(df) | ||
>>> ts = TSDataset(df_ts_format, "D") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually you don't need to create ts
here, you can just run
df_ts_format = TSDataset.to_dataset(df)
TSDataset.to_flatten(df_ts_format).head(5)
🤔
tests/test_datasets/test_dataset.py
Outdated
@@ -384,3 +384,13 @@ def test_right_format_sorting(): | |||
inv_df = tsd.to_pandas(flatten=True) | |||
pd.testing.assert_series_equal(df["reg_1"], inv_df["reg_1"]) | |||
pd.testing.assert_series_equal(df["reg_2"], inv_df["reg_2"]) | |||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''' |
tests/test_datasets/test_dataset.py
Outdated
@@ -52,6 +51,7 @@ def df_and_regressors() -> Tuple[pd.DataFrame, pd.DataFrame]: | |||
return df, df_exog | |||
|
|||
|
|||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''' |
IMPORTANT: Please do not create a Pull Request without creating an issue first.
Before submitting (must do checklist)
Type of Change
Proposed Changes
Create method
TSDataset.flatten
Related Issue
Closing issues
closes #226