Open
Conversation
…early data when asking for data aggr.
semvijverberg
commented
Mar 21, 2024
Comment on lines
+495
to
+496
| # adaptation now that intervals are defined as closed="both". | ||
| while self._map_year(min_year).iloc[-1].right < self._first_timestamp: |
Author
There was a problem hiding this comment.
core adaptation to closed on both sides here.
semvijverberg
commented
Mar 21, 2024
Comment on lines
378
to
+393
| for block in list_periods: | ||
| left_date += block.gap_dateoffset | ||
| right_date = left_date + block.length_dateoffset | ||
| intervals.append(pd.Interval(left_date, right_date, closed="left")) | ||
| right_date = left_date + block.length_dateoffset - pd.Timedelta(days=1) | ||
| intervals.append(pd.Interval(left_date, right_date, closed="both")) | ||
| # update left date | ||
| left_date = right_date | ||
| left_date = right_date + pd.Timedelta(days=1) | ||
| else: | ||
| # build from right to left | ||
| right_date = self._get_anchor(year) | ||
| right_date = self._get_anchor(year) - pd.Timedelta(days=1) | ||
| # loop through all the building blocks to | ||
| for block in list_periods: | ||
| right_date -= block.gap_dateoffset | ||
| left_date = right_date - block.length_dateoffset | ||
| intervals.append(pd.Interval(left_date, right_date, closed="left")) | ||
| left_date = right_date - block.length_dateoffset + pd.Timedelta(days=1) | ||
| intervals.append(pd.Interval(left_date, right_date, closed="both")) | ||
| # update right date | ||
| right_date = left_date | ||
| right_date = left_date - pd.Timedelta(days=1) |
Author
There was a problem hiding this comment.
core adaptation to closed on both sides here.
…ily_data-check-fails-datasize-is-2-copy-lilio-adaptation small bug fix for xarray with time.size < 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close pandas interval on both sides. Needed to get this working for yield data. In general this is a more robust solution.