Skip to content

Commit

Permalink
make sure only datetime indexes are truncated
Browse files Browse the repository at this point in the history
fixes #301
  • Loading branch information
fboerman committed Feb 5, 2024
1 parent 30330d6 commit 079fcd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion entsoe/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def year_wrapper(*args, start=None, end=None, **kwargs):
for _start, _end in blocks:
try:
frame = func(*args, start=_start, end=_end, **kwargs)
if func.__name__ != '_query_unavailability':
if func.__name__ != '_query_unavailability' and isinstance(frame.index, pd.DatetimeIndex):
# Due to partial matching func may return data indexed by
# timestamps outside _start and _end. In order to avoid
# (unintentionally) repeating records, frames are truncated to
Expand Down
2 changes: 1 addition & 1 deletion entsoe/entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)

__title__ = "entsoe-py"
__version__ = "0.6.5"
__version__ = "0.6.6"
__author__ = "EnergieID.be, Frank Boerman"
__license__ = "MIT"

Expand Down

0 comments on commit 079fcd5

Please sign in to comment.