Skip to content

Add function to duplicate exogenous data #291

Closed
1 task done
iKintosh opened this issue Nov 16, 2021 · 0 comments · Fixed by #305
Closed
1 task done

Add function to duplicate exogenous data #291

iKintosh opened this issue Nov 16, 2021 · 0 comments · Fixed by #305
Assignees
Labels
enhancement New feature or request

Comments

@iKintosh
Copy link
Contributor

iKintosh commented Nov 16, 2021

🚀 Feature Request

Add functions to utils to duplicate exogenous data by the number of segments

Motivation

Sometimes we have same exogenous data for all segments. In order to use it with etna it should be duplicated for all segments. We should have some utils to do it with ease.

Proposal

Expect data in the format of

data value
01-01-2021 12
exod_single: pd.DataFrame
list_of_segments: List[str]

result_df = duplicate_data(df=exod_single, segments=list_of_segments, format: str = "long")

the result should be

data value segment
01-01-2021 12 segment_1

Function should

  • duplicate exogenous data by the number of given segments
  • add proper segment names to columns
  • should have option flag on how to return data:
    • wide format (TSDataset format)
    • long format (old format)

Test cases

  • Duplicates data
  • Keeps selected format

Alternatives

No response

Additional context

No response

Checklist

  • I discussed this issue with ETNA Team
@iKintosh iKintosh added the enhancement New feature or request label Nov 16, 2021
@Mr-Geekman Mr-Geekman self-assigned this Nov 22, 2021
@Mr-Geekman Mr-Geekman mentioned this issue Nov 22, 2021
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants