Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zebras: Add update to TimeSeries. #2855

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open

Conversation

jaheba
Copy link
Contributor

@jaheba jaheba commented May 13, 2023

Allow merging of two time series.

With update it is possible to gradually build up a time series by updating the time series.

This works by creating a new series that spans both input series and is pre-filled with a default values. Then values are copied for the input series. This has some implications: If there is an overlap, the values of the second series overwrite the values of the first series in the overlapping span. Also, the values spanning between the two series remain the default value.

TODO:

  • Add consistency checks.
  • Merge static values
  • Merge metadata
  • Extend behaviour to other classes.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup


The new frame spans both input frames and inserts default values if
there is a gap between the two frames. If both frames overlap, the
second can overwrite the values of the first frame.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can or does?

Suggested change
second can overwrite the values of the first frame.
second overwrites the values of the first frame.


The new series spans both input series and inserts default values if
there is a gap between the two series. If both series overlap, the
second can overwrite the values of the first series.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
second can overwrite the values of the first series.
second overwrites the values of the first series.

Comment on lines 178 to 180
for name, (self_col, other_col, tdim) in rows_to_columns(
(self.columns, other.columns, self.tdims)
).items():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What columns are taken? Is it assumed that the two frames have the same columns? On only the ones from self are considered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the idea is that they need to be identical at the moment. I guess what we can do is to allow to update the result only partially and just fall back on the default value. That way one can even update different parts of the time frame at different times.

@jaheba jaheba marked this pull request as ready for review June 1, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants