-
Notifications
You must be signed in to change notification settings - Fork 8
Bugfix nat in buddy check #614
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -30,8 +30,8 @@ def synchronize_series( | |||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| * freq: the highest frequency present in the input series | ||||||||||||||||||||
| * origin: the earliest timestamp found, rounded down by the freq | ||||||||||||||||||||
| * closing: the latest timestamp found, rounded up by the freq. | ||||||||||||||||||||
| * origin: the earliest timestamp found across all input series | ||||||||||||||||||||
| * closing: the latest timestamp found across all input series. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Parameters | ||||||||||||||||||||
| ---------- | ||||||||||||||||||||
|
|
@@ -55,8 +55,8 @@ def synchronize_series( | |||||||||||||||||||
| trg_freq = min(frequencies) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # find origin and closing timestamp (earliest/latest) | ||||||||||||||||||||
| origin = min([s.index.min() for s in series_list]).floor(trg_freq) | ||||||||||||||||||||
| closing = max([s.index.max() for s in series_list]).ceil(trg_freq) | ||||||||||||||||||||
| origin = min([s.index.min() for s in series_list]) | ||||||||||||||||||||
| closing = max([s.index.max() for s in series_list]) | ||||||||||||||||||||
|
Comment on lines
+58
to
+59
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| # Create target datetime axes | ||||||||||||||||||||
| target_dt = pd.date_range(start=origin, end=closing, freq=trg_freq) | ||||||||||||||||||||
|
Comment on lines
61
to
62
|
||||||||||||||||||||
| # Create target datetime axes | |
| target_dt = pd.date_range(start=origin, end=closing, freq=trg_freq) | |
| # Align the target datetime axis to the inferred frequency by | |
| # flooring/ceiling the global min/max timestamps to trg_freq. | |
| origin_aligned = origin.floor(trg_freq) | |
| closing_aligned = closing.ceil(trg_freq) | |
| # Create target datetime axes | |
| target_dt = pd.date_range(start=origin_aligned, end=closing_aligned, freq=trg_freq) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| __version__ = "1.0.0" | ||
| __version__ = "1.0.1" |
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.
The docstring now states that
closingis “the latest timestamp found across all input series”, butpd.date_range(start=origin, end=closing, freq=trg_freq)will not necessarily includeclosingunless it lies exactly on the generated grid. This can make the documented definition of the target timestamps inaccurate and may hide edge cases where the last observations fall outside the generated index/tolerance window. Either clarify the wording (upper bound, not guaranteed included) or adjust the index generation to guarantee inclusion of the final boundary.