@@ -109,7 +109,7 @@ def __getitem__(
109
109
dropna = self ._dropna ,
110
110
)
111
111
112
- @validations .requires_strict_ordering ()
112
+ @validations .requires_ordering ()
113
113
def head (self , n : int = 5 ) -> df .DataFrame :
114
114
block = self ._block
115
115
if self ._dropna :
@@ -235,25 +235,25 @@ def count(self) -> df.DataFrame:
235
235
def nunique (self ) -> df .DataFrame :
236
236
return self ._aggregate_all (agg_ops .nunique_op )
237
237
238
- @validations .requires_strict_ordering ()
238
+ @validations .requires_ordering ()
239
239
def cumsum (self , * args , numeric_only : bool = False , ** kwargs ) -> df .DataFrame :
240
240
if not numeric_only :
241
241
self ._raise_on_non_numeric ("cumsum" )
242
242
return self ._apply_window_op (agg_ops .sum_op , numeric_only = True )
243
243
244
- @validations .requires_strict_ordering ()
244
+ @validations .requires_ordering ()
245
245
def cummin (self , * args , numeric_only : bool = False , ** kwargs ) -> df .DataFrame :
246
246
return self ._apply_window_op (agg_ops .min_op , numeric_only = numeric_only )
247
247
248
- @validations .requires_strict_ordering ()
248
+ @validations .requires_ordering ()
249
249
def cummax (self , * args , numeric_only : bool = False , ** kwargs ) -> df .DataFrame :
250
250
return self ._apply_window_op (agg_ops .max_op , numeric_only = numeric_only )
251
251
252
- @validations .requires_strict_ordering ()
252
+ @validations .requires_ordering ()
253
253
def cumprod (self , * args , ** kwargs ) -> df .DataFrame :
254
254
return self ._apply_window_op (agg_ops .product_op , numeric_only = True )
255
255
256
- @validations .requires_strict_ordering ()
256
+ @validations .requires_ordering ()
257
257
def shift (self , periods = 1 ) -> series .Series :
258
258
window = window_specs .rows (
259
259
grouping_keys = tuple (self ._by_col_ids ),
@@ -262,7 +262,7 @@ def shift(self, periods=1) -> series.Series:
262
262
)
263
263
return self ._apply_window_op (agg_ops .ShiftOp (periods ), window = window )
264
264
265
- @validations .requires_strict_ordering ()
265
+ @validations .requires_ordering ()
266
266
def diff (self , periods = 1 ) -> series .Series :
267
267
window = window_specs .rows (
268
268
grouping_keys = tuple (self ._by_col_ids ),
@@ -271,7 +271,7 @@ def diff(self, periods=1) -> series.Series:
271
271
)
272
272
return self ._apply_window_op (agg_ops .DiffOp (periods ), window = window )
273
273
274
- @validations .requires_strict_ordering ()
274
+ @validations .requires_ordering ()
275
275
def rolling (self , window : int , min_periods = None ) -> windows .Window :
276
276
# To get n size window, need current row and n-1 preceding rows.
277
277
window_spec = window_specs .rows (
@@ -287,7 +287,7 @@ def rolling(self, window: int, min_periods=None) -> windows.Window:
287
287
block , window_spec , self ._selected_cols , drop_null_groups = self ._dropna
288
288
)
289
289
290
- @validations .requires_strict_ordering ()
290
+ @validations .requires_ordering ()
291
291
def expanding (self , min_periods : int = 1 ) -> windows .Window :
292
292
window_spec = window_specs .cumulative_rows (
293
293
grouping_keys = tuple (self ._by_col_ids ),
@@ -532,7 +532,7 @@ def __init__(
532
532
def _session (self ) -> core .Session :
533
533
return self ._block .session
534
534
535
- @validations .requires_strict_ordering ()
535
+ @validations .requires_ordering ()
536
536
def head (self , n : int = 5 ) -> series .Series :
537
537
block = self ._block
538
538
if self ._dropna :
@@ -650,31 +650,31 @@ def agg(self, func=None) -> typing.Union[df.DataFrame, series.Series]:
650
650
651
651
aggregate = agg
652
652
653
- @validations .requires_strict_ordering ()
653
+ @validations .requires_ordering ()
654
654
def cumsum (self , * args , ** kwargs ) -> series .Series :
655
655
return self ._apply_window_op (
656
656
agg_ops .sum_op ,
657
657
)
658
658
659
- @validations .requires_strict_ordering ()
659
+ @validations .requires_ordering ()
660
660
def cumprod (self , * args , ** kwargs ) -> series .Series :
661
661
return self ._apply_window_op (
662
662
agg_ops .product_op ,
663
663
)
664
664
665
- @validations .requires_strict_ordering ()
665
+ @validations .requires_ordering ()
666
666
def cummax (self , * args , ** kwargs ) -> series .Series :
667
667
return self ._apply_window_op (
668
668
agg_ops .max_op ,
669
669
)
670
670
671
- @validations .requires_strict_ordering ()
671
+ @validations .requires_ordering ()
672
672
def cummin (self , * args , ** kwargs ) -> series .Series :
673
673
return self ._apply_window_op (
674
674
agg_ops .min_op ,
675
675
)
676
676
677
- @validations .requires_strict_ordering ()
677
+ @validations .requires_ordering ()
678
678
def cumcount (self , * args , ** kwargs ) -> series .Series :
679
679
return (
680
680
self ._apply_window_op (
@@ -684,7 +684,7 @@ def cumcount(self, *args, **kwargs) -> series.Series:
684
684
- 1
685
685
)
686
686
687
- @validations .requires_strict_ordering ()
687
+ @validations .requires_ordering ()
688
688
def shift (self , periods = 1 ) -> series .Series :
689
689
"""Shift index by desired number of periods."""
690
690
window = window_specs .rows (
@@ -694,7 +694,7 @@ def shift(self, periods=1) -> series.Series:
694
694
)
695
695
return self ._apply_window_op (agg_ops .ShiftOp (periods ), window = window )
696
696
697
- @validations .requires_strict_ordering ()
697
+ @validations .requires_ordering ()
698
698
def diff (self , periods = 1 ) -> series .Series :
699
699
window = window_specs .rows (
700
700
grouping_keys = tuple (self ._by_col_ids ),
@@ -703,7 +703,7 @@ def diff(self, periods=1) -> series.Series:
703
703
)
704
704
return self ._apply_window_op (agg_ops .DiffOp (periods ), window = window )
705
705
706
- @validations .requires_strict_ordering ()
706
+ @validations .requires_ordering ()
707
707
def rolling (self , window : int , min_periods = None ) -> windows .Window :
708
708
# To get n size window, need current row and n-1 preceding rows.
709
709
window_spec = window_specs .rows (
@@ -723,7 +723,7 @@ def rolling(self, window: int, min_periods=None) -> windows.Window:
723
723
is_series = True ,
724
724
)
725
725
726
- @validations .requires_strict_ordering ()
726
+ @validations .requires_ordering ()
727
727
def expanding (self , min_periods : int = 1 ) -> windows .Window :
728
728
window_spec = window_specs .cumulative_rows (
729
729
grouping_keys = tuple (self ._by_col_ids ),
0 commit comments