File tree 2 files changed +10
-0
lines changed 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1028,6 +1028,12 @@ def validate(self):
1028
1028
"compat with a datetimelike "
1029
1029
"index" .format (self .window ))
1030
1030
1031
+ # we don't allow center
1032
+ if self .center :
1033
+ raise NotImplementedError ("center is not implemented "
1034
+ "for datetimelike and offset "
1035
+ "based windows" )
1036
+
1031
1037
# this will raise ValueError on non-fixed freqs
1032
1038
self .window = freq .nanos
1033
1039
self .win_type = 'freq'
Original file line number Diff line number Diff line change @@ -3129,6 +3129,10 @@ def test_valid(self):
3129
3129
with self .assertRaises (ValueError ):
3130
3130
df .rolling (window = '1D' , min_periods = minp )
3131
3131
3132
+ # center is not implemented
3133
+ with self .assertRaises (NotImplementedError ):
3134
+ df .rolling (window = '1D' , center = True )
3135
+
3132
3136
def test_on (self ):
3133
3137
3134
3138
df = self .regular
You can’t perform that action at this time.
0 commit comments