Skip to content

Commit 4ac1291

Browse files
authored
formatting (#303)
1 parent 1addc2a commit 4ac1291

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

spec/API_specification/dataframe_api/column_object.py

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def __column_namespace__(self) -> Namespace:
3232
attribute. It may contain other public names as well, but it is
3333
recommended to only include those names that are part of the
3434
specification.
35-
3635
"""
36+
...
3737

3838
@property
3939
def column(self) -> Any:
@@ -52,6 +52,7 @@ def __len__(self) -> int:
5252
"""
5353
Return the number of rows.
5454
"""
55+
...
5556

5657
def __iter__(self) -> NoReturn:
5758
"""
@@ -66,10 +67,11 @@ def __iter__(self) -> NoReturn:
6667
raise NotImplementedError("'__iter__' is intentionally not implemented.")
6768

6869
@property
69-
def dtype(self) -> Any:
70+
def dtype(self) -> DType:
7071
"""
7172
Return data type of column.
7273
"""
74+
...
7375

7476
def get_rows(self, indices: Self) -> Self:
7577
"""
@@ -213,6 +215,7 @@ def __eq__(self, other: Self | Scalar) -> Self: # type: ignore[override]
213215
-------
214216
Column
215217
"""
218+
...
216219

217220
def __ne__(self, other: Self | Scalar) -> Self: # type: ignore[override]
218221
"""
@@ -231,6 +234,7 @@ def __ne__(self, other: Self | Scalar) -> Self: # type: ignore[override]
231234
-------
232235
Column
233236
"""
237+
...
234238

235239
def __ge__(self, other: Self | Scalar) -> Self:
236240
"""
@@ -247,6 +251,7 @@ def __ge__(self, other: Self | Scalar) -> Self:
247251
-------
248252
Column
249253
"""
254+
...
250255

251256
def __gt__(self, other: Self | Scalar) -> Self:
252257
"""
@@ -263,6 +268,7 @@ def __gt__(self, other: Self | Scalar) -> Self:
263268
-------
264269
Column
265270
"""
271+
...
266272

267273
def __le__(self, other: Self | Scalar) -> Self:
268274
"""
@@ -279,6 +285,7 @@ def __le__(self, other: Self | Scalar) -> Self:
279285
-------
280286
Column
281287
"""
288+
...
282289

283290
def __lt__(self, other: Self | Scalar) -> Self:
284291
"""
@@ -295,6 +302,7 @@ def __lt__(self, other: Self | Scalar) -> Self:
295302
-------
296303
Column
297304
"""
305+
...
298306

299307
def __and__(self, other: Self | bool) -> Self:
300308
"""
@@ -316,6 +324,7 @@ def __and__(self, other: Self | bool) -> Self:
316324
ValueError
317325
If `self` or `other` is not boolean.
318326
"""
327+
...
319328

320329
def __or__(self, other: Self | bool) -> Self:
321330
"""
@@ -337,6 +346,7 @@ def __or__(self, other: Self | bool) -> Self:
337346
ValueError
338347
If `self` or `other` is not boolean.
339348
"""
349+
...
340350

341351
def __add__(self, other: Self | Scalar) -> Self:
342352
"""
@@ -353,6 +363,7 @@ def __add__(self, other: Self | Scalar) -> Self:
353363
-------
354364
Column
355365
"""
366+
...
356367

357368
def __sub__(self, other: Self | Scalar) -> Self:
358369
"""
@@ -369,6 +380,7 @@ def __sub__(self, other: Self | Scalar) -> Self:
369380
-------
370381
Column
371382
"""
383+
...
372384

373385
def __mul__(self, other: Self | Scalar) -> Self:
374386
"""
@@ -385,6 +397,7 @@ def __mul__(self, other: Self | Scalar) -> Self:
385397
-------
386398
Column
387399
"""
400+
...
388401

389402
def __truediv__(self, other: Self | Scalar) -> Self:
390403
"""
@@ -401,6 +414,7 @@ def __truediv__(self, other: Self | Scalar) -> Self:
401414
-------
402415
Column
403416
"""
417+
...
404418

405419
def __floordiv__(self, other: Self | Scalar) -> Self:
406420
"""
@@ -417,6 +431,7 @@ def __floordiv__(self, other: Self | Scalar) -> Self:
417431
-------
418432
Column
419433
"""
434+
...
420435

421436
def __pow__(self, other: Self | Scalar) -> Self:
422437
"""
@@ -437,6 +452,7 @@ def __pow__(self, other: Self | Scalar) -> Self:
437452
-------
438453
Column
439454
"""
455+
...
440456

441457
def __mod__(self, other: Self | Scalar) -> Self:
442458
"""
@@ -453,6 +469,7 @@ def __mod__(self, other: Self | Scalar) -> Self:
453469
-------
454470
Column
455471
"""
472+
...
456473

457474
def __divmod__(self, other: Self | Scalar) -> tuple[Column, Column]:
458475
"""
@@ -469,6 +486,7 @@ def __divmod__(self, other: Self | Scalar) -> tuple[Column, Column]:
469486
-------
470487
Column
471488
"""
489+
...
472490

473491
def __radd__(self, other: Self | Scalar) -> Self:
474492
...
@@ -498,6 +516,7 @@ def __invert__(self) -> Self:
498516
ValueError
499517
If any of the Column's columns is not boolean.
500518
"""
519+
...
501520

502521
def any(self, *, skip_nulls: bool = True) -> bool | NullType:
503522
"""
@@ -508,6 +527,7 @@ def any(self, *, skip_nulls: bool = True) -> bool | NullType:
508527
ValueError
509528
If column is not boolean.
510529
"""
530+
...
511531

512532
def all(self, *, skip_nulls: bool = True) -> bool | NullType:
513533
"""
@@ -518,31 +538,36 @@ def all(self, *, skip_nulls: bool = True) -> bool | NullType:
518538
ValueError
519539
If column is not boolean.
520540
"""
541+
...
521542

522543
def min(self, *, skip_nulls: bool = True) -> Scalar | NullType:
523544
"""
524545
Reduction returns a scalar. Any data type that supports comparisons
525546
must be supported. The returned value has the same dtype as the column.
526547
"""
548+
...
527549

528550
def max(self, *, skip_nulls: bool = True) -> Scalar | NullType:
529551
"""
530552
Reduction returns a scalar. Any data type that supports comparisons
531553
must be supported. The returned value has the same dtype as the column.
532554
"""
555+
...
533556

534557
def sum(self, *, skip_nulls: bool = True) -> Scalar | NullType:
535558
"""
536559
Reduction returns a scalar. Must be supported for numerical and
537560
datetime data types. The returned value has the same dtype as the
538561
column.
539562
"""
563+
...
540564

541565
def prod(self, *, skip_nulls: bool = True) -> Scalar | NullType:
542566
"""
543567
Reduction returns a scalar. Must be supported for numerical data types.
544568
The returned value has the same dtype as the column.
545569
"""
570+
...
546571

547572
def median(self, *, skip_nulls: bool = True) -> Scalar | NullType:
548573
"""
@@ -551,6 +576,7 @@ def median(self, *, skip_nulls: bool = True) -> Scalar | NullType:
551576
datetime (with the appropriate timedelta format string) for datetime
552577
dtypes.
553578
"""
579+
...
554580

555581
def mean(self, *, skip_nulls: bool = True) -> Scalar | NullType:
556582
"""
@@ -559,6 +585,7 @@ def mean(self, *, skip_nulls: bool = True) -> Scalar | NullType:
559585
datetime (with the appropriate timedelta format string) for datetime
560586
dtypes.
561587
"""
588+
...
562589

563590
def std(self, *, correction: int | float = 1, skip_nulls: bool = True) -> Scalar | NullType:
564591
"""
@@ -585,6 +612,7 @@ def std(self, *, correction: int | float = 1, skip_nulls: bool = True) -> Scalar
585612
skip_nulls
586613
Whether to skip null values.
587614
"""
615+
...
588616

589617
def var(self, *, correction: int | float = 1, skip_nulls: bool = True) -> Scalar | NullType:
590618
"""
@@ -602,32 +630,37 @@ def var(self, *, correction: int | float = 1, skip_nulls: bool = True) -> Scalar
602630
skip_nulls
603631
Whether to skip null values.
604632
"""
633+
...
605634

606635
def cumulative_max(self) -> Self:
607636
"""
608637
Reduction returns a Column. Any data type that supports comparisons
609638
must be supported. The returned value has the same dtype as the column.
610639
"""
640+
...
611641

612642
def cumulative_min(self) -> Self:
613643
"""
614644
Reduction returns a Column. Any data type that supports comparisons
615645
must be supported. The returned value has the same dtype as the column.
616646
"""
647+
...
617648

618649
def cumulative_sum(self) -> Self:
619650
"""
620651
Reduction returns a Column. Must be supported for numerical and
621652
datetime data types. The returned value has the same dtype as the
622653
column.
623654
"""
655+
...
624656

625657
def cumulative_prod(self) -> Self:
626658
"""
627659
Reduction returns a Column. Must be supported for numerical and
628660
datetime data types. The returned value has the same dtype as the
629661
column.
630662
"""
663+
...
631664

632665
def is_null(self) -> Self:
633666
"""
@@ -647,6 +680,7 @@ def is_null(self) -> Self:
647680
May optionally include 'NaT' values (if present in an implementation),
648681
but note that the Standard makes no guarantees about them.
649682
"""
683+
...
650684

651685
def is_nan(self) -> Self:
652686
"""
@@ -666,6 +700,7 @@ def is_nan(self) -> Self:
666700
Does *not* include 'missing' or 'null' entries.
667701
In particular, does not check for `np.timedelta64('NaT')`.
668702
"""
703+
...
669704

670705
def is_in(self, values: Self) -> Self:
671706
"""
@@ -684,6 +719,7 @@ def is_in(self, values: Self) -> Self:
684719
-------
685720
Column
686721
"""
722+
...
687723

688724
def unique_indices(self, *, skip_nulls: bool = True) -> Self:
689725
"""
@@ -766,6 +802,7 @@ def to_array(self) -> Any:
766802
understanding that consuming libraries would then use the
767803
``array-api-compat`` package to convert it to a Standard-compliant array.
768804
"""
805+
...
769806

770807
def rename(self, name: str) -> Self:
771808
"""

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def __dataframe_namespace__(self) -> Namespace:
5050
recommended to only include those names that are part of the
5151
specification.
5252
"""
53+
...
5354

5455
@property
5556
def dataframe(self) -> SupportsDataFrameAPI:
@@ -64,6 +65,7 @@ def shape(self) -> tuple[int, int]:
6465
"""
6566
Return number of rows and number of columns.
6667
"""
68+
...
6769

6870
def group_by(self, *keys: str) -> GroupBy:
6971
"""
@@ -255,7 +257,7 @@ def column_names(self) -> list[str]:
255257
...
256258

257259
@property
258-
def schema(self) -> dict[str, Any]:
260+
def schema(self) -> dict[str, DType]:
259261
"""
260262
Get dataframe's schema.
261263
@@ -264,6 +266,7 @@ def schema(self) -> dict[str, Any]:
264266
dict[str, Any]
265267
Mapping from column name to data type.
266268
"""
269+
...
267270

268271
def sort(
269272
self,
@@ -463,6 +466,7 @@ def __and__(self, other: bool) -> Self:
463466
ValueError
464467
If `self` or `other` is not boolean.
465468
"""
469+
...
466470

467471
def __or__(self, other: bool) -> Self:
468472
"""
@@ -483,6 +487,7 @@ def __or__(self, other: bool) -> Self:
483487
ValueError
484488
If `self` or `other` is not boolean.
485489
"""
490+
...
486491

487492
def __add__(self, other: Scalar) -> Self:
488493
"""
@@ -966,3 +971,4 @@ def join(
966971
If, apart from `left_on` and `right_on`, there are any column names
967972
present in both `self` and `other`.
968973
"""
974+
...

0 commit comments

Comments
 (0)