@@ -62,16 +62,21 @@ def test_lazy_cum_sum_grouped(
6262 constructor (
6363 {
6464 "arg entina" : [1 , 2 , 3 ],
65- "ban gkock " : [1 , 0 , 2 ],
65+ "ban gkok " : [1 , 0 , 2 ],
6666 "i ran" : [0 , 1 , 2 ],
6767 "g" : [1 , 1 , 1 ],
6868 }
6969 )
7070 )
7171 result = df .with_columns (
72- nw .col ("arg entina" ).cum_sum (reverse = reverse ).over ("g" , order_by = "ban gkock " )
72+ nw .col ("arg entina" ).cum_sum (reverse = reverse ).over ("g" , order_by = "ban gkok " )
7373 ).sort ("i ran" )
74- expected = {"arg entina" : expected_a , "ban gkock" : [1 , 0 , 2 ], "i ran" : [0 , 1 , 2 ]}
74+ expected = {
75+ "arg entina" : expected_a ,
76+ "ban gkok" : [1 , 0 , 2 ],
77+ "i ran" : [0 , 1 , 2 ],
78+ "g" : [1 , 1 , 1 ],
79+ }
7580 assert_equal_data (result , expected )
7681
7782
@@ -110,19 +115,20 @@ def test_lazy_cum_sum_ordered_by_nulls(
110115 constructor (
111116 {
112117 "arg entina" : [1 , 2 , 3 , 1 , 2 , 3 , 4 ],
113- "ban gkock " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
118+ "ban gkok " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
114119 "i ran" : [0 , 1 , 2 , 3 , 4 , 5 , 6 ],
115120 "g" : [1 , 1 , 1 , 1 , 1 , 1 , 1 ],
116121 }
117122 )
118123 )
119124 result = df .with_columns (
120- nw .col ("arg entina" ).cum_sum (reverse = reverse ).over ("g" , order_by = "ban gkock " )
125+ nw .col ("arg entina" ).cum_sum (reverse = reverse ).over ("g" , order_by = "ban gkok " )
121126 ).sort ("i ran" )
122127 expected = {
123128 "arg entina" : expected_a ,
124- "ban gkock " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
129+ "ban gkok " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
125130 "i ran" : [0 , 1 , 2 , 3 , 4 , 5 , 6 ],
131+ "g" : [1 , 1 , 1 , 1 , 1 , 1 , 1 ],
126132 }
127133 assert_equal_data (result , expected )
128134
@@ -156,15 +162,15 @@ def test_lazy_cum_sum_ungrouped(
156162 constructor (
157163 {
158164 "arg entina" : [2 , 3 , 1 ],
159- "ban gkock " : [0 , 2 , 1 ],
165+ "ban gkok " : [0 , 2 , 1 ],
160166 "i ran" : [1 , 2 , 0 ],
161167 }
162168 )
163169 ).sort ("i ran" )
164170 result = df .with_columns (
165- nw .col ("arg entina" ).cum_sum (reverse = reverse ).over (order_by = "ban gkock " )
171+ nw .col ("arg entina" ).cum_sum (reverse = reverse ).over (order_by = "ban gkok " )
166172 ).sort ("i ran" )
167- expected = {"arg entina" : expected_a , "ban gkock " : [1 , 0 , 2 ], "i ran" : [0 , 1 , 2 ]}
173+ expected = {"arg entina" : expected_a , "ban gkok " : [1 , 0 , 2 ], "i ran" : [0 , 1 , 2 ]}
168174 assert_equal_data (result , expected )
169175
170176
@@ -197,17 +203,17 @@ def test_lazy_cum_sum_ungrouped_ordered_by_nulls(
197203 constructor (
198204 {
199205 "arg entina" : [1 , 2 , 3 , 1 , 2 , 3 , 4 ],
200- "ban gkock " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
206+ "ban gkok " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
201207 "i ran" : [0 , 1 , 2 , 3 , 4 , 5 , 6 ],
202208 }
203209 )
204210 ).sort ("i ran" )
205211 result = df .with_columns (
206- nw .col ("arg entina" ).cum_sum (reverse = reverse ).over (order_by = "ban gkock " )
212+ nw .col ("arg entina" ).cum_sum (reverse = reverse ).over (order_by = "ban gkok " )
207213 ).sort ("i ran" )
208214 expected = {
209215 "arg entina" : expected_a ,
210- "ban gkock " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
216+ "ban gkok " : [1 , - 1 , 3 , 2 , 5 , 0 , None ],
211217 "i ran" : [0 , 1 , 2 , 3 , 4 , 5 , 6 ],
212218 }
213219 assert_equal_data (result , expected )
0 commit comments