Skip to content

Commit 90dfb0c

Browse files
carlosdanielcsantosjreback
carlosdanielcsantos
authored andcommitted
Correcting bug in window validation
1 parent 8bd336a commit 90dfb0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/window.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,8 @@ def validate(self):
10571057
raise ValueError("window must be an integer")
10581058
elif self.window < 0:
10591059
raise ValueError("window must be non-negative")
1060-
elif self.closed is not None:
1060+
1061+
if not self.is_datetimelike and self.closed is not None:
10611062
raise ValueError("closed only implemented for datetimelike "
10621063
"and offset based windows")
10631064

0 commit comments

Comments
 (0)