Skip to content

Commit 8268072

Browse files
authored
make skip_nulls keyword-only where possible (#161)
Co-authored-by: MarcoGorelli <>
1 parent 7059081 commit 8268072

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

spec/API_specification/dataframe_api/column_object.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def __invert__(self) -> Column:
270270
If any of the Column's columns is not boolean.
271271
"""
272272

273-
def any(self, skip_nulls: bool = True) -> bool:
273+
def any(self, *, skip_nulls: bool = True) -> bool:
274274
"""
275275
Reduction returns a bool.
276276
@@ -280,7 +280,7 @@ def any(self, skip_nulls: bool = True) -> bool:
280280
If column is not boolean.
281281
"""
282282

283-
def all(self, skip_nulls: bool = True) -> bool:
283+
def all(self, *, skip_nulls: bool = True) -> bool:
284284
"""
285285
Reduction returns a bool.
286286
@@ -290,56 +290,56 @@ def all(self, skip_nulls: bool = True) -> bool:
290290
If column is not boolean.
291291
"""
292292

293-
def min(self, skip_nulls: bool = True) -> dtype:
293+
def min(self, *, skip_nulls: bool = True) -> dtype:
294294
"""
295295
Reduction returns a scalar. Any data type that supports comparisons
296296
must be supported. The returned value has the same dtype as the column.
297297
"""
298298

299-
def max(self, skip_nulls: bool = True) -> dtype:
299+
def max(self, *, skip_nulls: bool = True) -> dtype:
300300
"""
301301
Reduction returns a scalar. Any data type that supports comparisons
302302
must be supported. The returned value has the same dtype as the column.
303303
"""
304304

305-
def sum(self, skip_nulls: bool = True) -> dtype:
305+
def sum(self, *, skip_nulls: bool = True) -> dtype:
306306
"""
307307
Reduction returns a scalar. Must be supported for numerical and
308308
datetime data types. The returned value has the same dtype as the
309309
column.
310310
"""
311311

312-
def prod(self, skip_nulls: bool = True) -> dtype:
312+
def prod(self, *, skip_nulls: bool = True) -> dtype:
313313
"""
314314
Reduction returns a scalar. Must be supported for numerical data types.
315315
The returned value has the same dtype as the column.
316316
"""
317317

318-
def median(self, skip_nulls: bool = True) -> dtype:
318+
def median(self, *, skip_nulls: bool = True) -> dtype:
319319
"""
320320
Reduction returns a scalar. Must be supported for numerical and
321321
datetime data types. Returns a float for numerical data types, and
322322
datetime (with the appropriate timedelta format string) for datetime
323323
dtypes.
324324
"""
325325

326-
def mean(self, skip_nulls: bool = True) -> dtype:
326+
def mean(self, *, skip_nulls: bool = True) -> dtype:
327327
"""
328328
Reduction returns a scalar. Must be supported for numerical and
329329
datetime data types. Returns a float for numerical data types, and
330330
datetime (with the appropriate timedelta format string) for datetime
331331
dtypes.
332332
"""
333333

334-
def std(self, skip_nulls: bool = True) -> dtype:
334+
def std(self, *, skip_nulls: bool = True) -> dtype:
335335
"""
336336
Reduction returns a scalar. Must be supported for numerical and
337337
datetime data types. Returns a float for numerical data types, and
338338
datetime (with the appropriate timedelta format string) for datetime
339339
dtypes.
340340
"""
341341

342-
def var(self, skip_nulls: bool = True) -> dtype:
342+
def var(self, *, skip_nulls: bool = True) -> dtype:
343343
"""
344344
Reduction returns a scalar. Must be supported for numerical and
345345
datetime data types. Returns a float for numerical data types, and

spec/API_specification/dataframe_api/dataframe_object.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ def __iter__(self) -> NoReturn:
543543
"""
544544
raise NotImplementedError("'__iter__' is intentionally not implemented.")
545545

546-
def any(self, skip_nulls: bool = True) -> DataFrame:
546+
def any(self, *, skip_nulls: bool = True) -> DataFrame:
547547
"""
548548
Reduction returns a 1-row DataFrame.
549549
@@ -554,7 +554,7 @@ def any(self, skip_nulls: bool = True) -> DataFrame:
554554
"""
555555
...
556556

557-
def all(self, skip_nulls: bool = True) -> DataFrame:
557+
def all(self, *, skip_nulls: bool = True) -> DataFrame:
558558
"""
559559
Reduction returns a 1-row DataFrame.
560560
@@ -565,7 +565,7 @@ def all(self, skip_nulls: bool = True) -> DataFrame:
565565
"""
566566
...
567567

568-
def any_rowwise(self, skip_nulls: bool = True) -> Column:
568+
def any_rowwise(self, *, skip_nulls: bool = True) -> Column:
569569
"""
570570
Reduction returns a Column.
571571
@@ -579,7 +579,7 @@ def any_rowwise(self, skip_nulls: bool = True) -> Column:
579579
"""
580580
...
581581

582-
def all_rowwise(self, skip_nulls: bool = True) -> Column:
582+
def all_rowwise(self, *, skip_nulls: bool = True) -> Column:
583583
"""
584584
Reduction returns a Column.
585585
@@ -593,49 +593,49 @@ def all_rowwise(self, skip_nulls: bool = True) -> Column:
593593
"""
594594
...
595595

596-
def min(self, skip_nulls: bool = True) -> DataFrame:
596+
def min(self, *, skip_nulls: bool = True) -> DataFrame:
597597
"""
598598
Reduction returns a 1-row DataFrame.
599599
"""
600600
...
601601

602-
def max(self, skip_nulls: bool = True) -> DataFrame:
602+
def max(self, *, skip_nulls: bool = True) -> DataFrame:
603603
"""
604604
Reduction returns a 1-row DataFrame.
605605
"""
606606
...
607607

608-
def sum(self, skip_nulls: bool = True) -> DataFrame:
608+
def sum(self, *, skip_nulls: bool = True) -> DataFrame:
609609
"""
610610
Reduction returns a 1-row DataFrame.
611611
"""
612612
...
613613

614-
def prod(self, skip_nulls: bool = True) -> DataFrame:
614+
def prod(self, *, skip_nulls: bool = True) -> DataFrame:
615615
"""
616616
Reduction returns a 1-row DataFrame.
617617
"""
618618
...
619619

620-
def median(self, skip_nulls: bool = True) -> DataFrame:
620+
def median(self, *, skip_nulls: bool = True) -> DataFrame:
621621
"""
622622
Reduction returns a 1-row DataFrame.
623623
"""
624624
...
625625

626-
def mean(self, skip_nulls: bool = True) -> DataFrame:
626+
def mean(self, *, skip_nulls: bool = True) -> DataFrame:
627627
"""
628628
Reduction returns a 1-row DataFrame.
629629
"""
630630
...
631631

632-
def std(self, skip_nulls: bool = True) -> DataFrame:
632+
def std(self, *, skip_nulls: bool = True) -> DataFrame:
633633
"""
634634
Reduction returns a 1-row DataFrame.
635635
"""
636636
...
637637

638-
def var(self, skip_nulls: bool = True) -> DataFrame:
638+
def var(self, *, skip_nulls: bool = True) -> DataFrame:
639639
"""
640640
Reduction returns a 1-row DataFrame.
641641
"""

spec/API_specification/dataframe_api/groupby_object.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,34 @@ class GroupBy:
1717
**Methods**
1818
1919
"""
20-
def any(self, skip_nulls: bool = True) -> "DataFrame":
20+
def any(self, *, skip_nulls: bool = True) -> "DataFrame":
2121
...
2222

23-
def all(self, skip_nulls: bool = True) -> "DataFrame":
23+
def all(self, *, skip_nulls: bool = True) -> "DataFrame":
2424
...
2525

26-
def min(self, skip_nulls: bool = True) -> "DataFrame":
26+
def min(self, *, skip_nulls: bool = True) -> "DataFrame":
2727
...
2828

29-
def max(self, skip_nulls: bool = True) -> "DataFrame":
29+
def max(self, *, skip_nulls: bool = True) -> "DataFrame":
3030
...
3131

32-
def sum(self, skip_nulls: bool = True) -> "DataFrame":
32+
def sum(self, *, skip_nulls: bool = True) -> "DataFrame":
3333
...
3434

35-
def prod(self, skip_nulls: bool = True) -> "DataFrame":
35+
def prod(self, *, skip_nulls: bool = True) -> "DataFrame":
3636
...
3737

38-
def median(self, skip_nulls: bool = True) -> "DataFrame":
38+
def median(self, *, skip_nulls: bool = True) -> "DataFrame":
3939
...
4040

41-
def mean(self, skip_nulls: bool = True) -> "DataFrame":
41+
def mean(self, *, skip_nulls: bool = True) -> "DataFrame":
4242
...
4343

44-
def std(self, skip_nulls: bool = True) -> "DataFrame":
44+
def std(self, *, skip_nulls: bool = True) -> "DataFrame":
4545
...
4646

47-
def var(self, skip_nulls: bool = True) -> "DataFrame":
47+
def var(self, *, skip_nulls: bool = True) -> "DataFrame":
4848
...
4949

5050
def size(self) -> "DataFrame":

0 commit comments

Comments
 (0)