@@ -359,16 +359,15 @@ def sorted_indices(
359
359
"""
360
360
...
361
361
362
- def __eq__ (self , other : DataFrame | Scalar ) -> DataFrame : # type: ignore[override]
362
+ def __eq__ (self , other : Scalar ) -> DataFrame : # type: ignore[override]
363
363
"""
364
364
Compare for equality.
365
365
366
366
Nulls should follow Kleene Logic.
367
367
368
368
Parameters
369
369
----------
370
- other : DataFrame or Scalar
371
- If DataFrame, must have same length and matching columns.
370
+ other : Scalar
372
371
"Scalar" here is defined implicitly by what scalar types are allowed
373
372
for the operation by the underling dtypes.
374
373
@@ -378,16 +377,15 @@ def __eq__(self, other: DataFrame | Scalar) -> DataFrame: # type: ignore[overri
378
377
"""
379
378
...
380
379
381
- def __ne__ (self , other : DataFrame | Scalar ) -> DataFrame : # type: ignore[override]
380
+ def __ne__ (self , other : Scalar ) -> DataFrame : # type: ignore[override]
382
381
"""
383
382
Compare for non-equality.
384
383
385
384
Nulls should follow Kleene Logic.
386
385
387
386
Parameters
388
387
----------
389
- other : DataFrame or Scalar
390
- If DataFrame, must have same length and matching columns.
388
+ other : Scalar
391
389
"Scalar" here is defined implicitly by what scalar types are allowed
392
390
for the operation by the underling dtypes.
393
391
@@ -397,14 +395,13 @@ def __ne__(self, other: DataFrame | Scalar) -> DataFrame: # type: ignore[overri
397
395
"""
398
396
...
399
397
400
- def __ge__ (self , other : DataFrame | Scalar ) -> DataFrame :
398
+ def __ge__ (self , other : Scalar ) -> DataFrame :
401
399
"""
402
400
Compare for "greater than or equal to" `other`.
403
401
404
402
Parameters
405
403
----------
406
- other : DataFrame or Scalar
407
- If DataFrame, must have same length and matching columns.
404
+ other : Scalar
408
405
"Scalar" here is defined implicitly by what scalar types are allowed
409
406
for the operation by the underling dtypes.
410
407
@@ -414,14 +411,13 @@ def __ge__(self, other: DataFrame | Scalar) -> DataFrame:
414
411
"""
415
412
...
416
413
417
- def __gt__ (self , other : DataFrame | Scalar ) -> DataFrame :
414
+ def __gt__ (self , other : Scalar ) -> DataFrame :
418
415
"""
419
416
Compare for "greater than" `other`.
420
417
421
418
Parameters
422
419
----------
423
- other : DataFrame or Scalar
424
- If DataFrame, must have same length and matching columns.
420
+ other : Scalar
425
421
"Scalar" here is defined implicitly by what scalar types are allowed
426
422
for the operation by the underling dtypes.
427
423
@@ -431,14 +427,13 @@ def __gt__(self, other: DataFrame | Scalar) -> DataFrame:
431
427
"""
432
428
...
433
429
434
- def __le__ (self , other : DataFrame | Scalar ) -> DataFrame :
430
+ def __le__ (self , other : Scalar ) -> DataFrame :
435
431
"""
436
432
Compare for "less than or equal to" `other`.
437
433
438
434
Parameters
439
435
----------
440
- other : DataFrame or Scalar
441
- If DataFrame, must have same length and matching columns.
436
+ other : Scalar
442
437
"Scalar" here is defined implicitly by what scalar types are allowed
443
438
for the operation by the underling dtypes.
444
439
@@ -448,14 +443,13 @@ def __le__(self, other: DataFrame | Scalar) -> DataFrame:
448
443
"""
449
444
...
450
445
451
- def __lt__ (self , other : DataFrame | Scalar ) -> DataFrame :
446
+ def __lt__ (self , other : Scalar ) -> DataFrame :
452
447
"""
453
448
Compare for "less than" `other`.
454
449
455
450
Parameters
456
451
----------
457
- other : DataFrame or Scalar
458
- If DataFrame, must have same length and matching columns.
452
+ other : Scalar
459
453
"Scalar" here is defined implicitly by what scalar types are allowed
460
454
for the operation by the underling dtypes.
461
455
@@ -465,16 +459,15 @@ def __lt__(self, other: DataFrame | Scalar) -> DataFrame:
465
459
"""
466
460
...
467
461
468
- def __and__ (self , other : DataFrame | bool ) -> DataFrame :
462
+ def __and__ (self , other : bool ) -> DataFrame :
469
463
"""
470
- Apply logical 'and' to `other` DataFrame (or scalar) and this dataframe.
464
+ Apply logical 'and' to `other` scalar and this dataframe.
471
465
472
466
Nulls should follow Kleene Logic.
473
467
474
468
Parameters
475
469
----------
476
- other : DataFrame[bool] or bool
477
- If DataFrame, must have same length.
470
+ other : bool
478
471
479
472
Returns
480
473
-------
@@ -488,14 +481,13 @@ def __and__(self, other: DataFrame | bool) -> DataFrame:
488
481
489
482
def __or__ (self , other : DataFrame | bool ) -> DataFrame :
490
483
"""
491
- Apply logical 'or' to `other` DataFrame (or scalar) and this DataFrame.
484
+ Apply logical 'or' to `other` scalar and this DataFrame.
492
485
493
486
Nulls should follow Kleene Logic.
494
487
495
488
Parameters
496
489
----------
497
- other : DataFrame[bool] or bool
498
- If DataFrame, must have same length.
490
+ other : bool
499
491
500
492
Returns
501
493
-------
@@ -507,14 +499,13 @@ def __or__(self, other: DataFrame | bool) -> DataFrame:
507
499
If `self` or `other` is not boolean.
508
500
"""
509
501
510
- def __add__ (self , other : DataFrame | Scalar ) -> DataFrame :
502
+ def __add__ (self , other : Scalar ) -> DataFrame :
511
503
"""
512
- Add `other` dataframe or scalar to this dataframe.
504
+ Add `other` scalar to this dataframe.
513
505
514
506
Parameters
515
507
----------
516
- other : DataFrame or Scalar
517
- If DataFrame, must have same length and matching columns.
508
+ other : Scalar
518
509
"Scalar" here is defined implicitly by what scalar types are allowed
519
510
for the operation by the underling dtypes.
520
511
@@ -524,14 +515,13 @@ def __add__(self, other: DataFrame | Scalar) -> DataFrame:
524
515
"""
525
516
...
526
517
527
- def __sub__ (self , other : DataFrame | Scalar ) -> DataFrame :
518
+ def __sub__ (self , other : Scalar ) -> DataFrame :
528
519
"""
529
- Subtract `other` dataframe or scalar from this dataframe.
520
+ Subtract `other` scalar from this dataframe.
530
521
531
522
Parameters
532
523
----------
533
- other : DataFrame or Scalar
534
- If DataFrame, must have same length and matching columns.
524
+ other : Scalar
535
525
"Scalar" here is defined implicitly by what scalar types are allowed
536
526
for the operation by the underling dtypes.
537
527
@@ -541,14 +531,13 @@ def __sub__(self, other: DataFrame | Scalar) -> DataFrame:
541
531
"""
542
532
...
543
533
544
- def __mul__ (self , other : DataFrame | Scalar ) -> DataFrame :
534
+ def __mul__ (self , other : Scalar ) -> DataFrame :
545
535
"""
546
- Multiply `other` dataframe or scalar with this dataframe.
536
+ Multiply `other` scalar with this dataframe.
547
537
548
538
Parameters
549
539
----------
550
- other : DataFrame or Scalar
551
- If DataFrame, must have same length and matching columns.
540
+ other : Scalar
552
541
"Scalar" here is defined implicitly by what scalar types are allowed
553
542
for the operation by the underling dtypes.
554
543
@@ -558,14 +547,13 @@ def __mul__(self, other: DataFrame | Scalar) -> DataFrame:
558
547
"""
559
548
...
560
549
561
- def __truediv__ (self , other : DataFrame | Scalar ) -> DataFrame :
550
+ def __truediv__ (self , other : Scalar ) -> DataFrame :
562
551
"""
563
- Divide this dataframe by `other` dataframe or scalar. True division, returns floats.
552
+ Divide this dataframe by `other` scalar. True division, returns floats.
564
553
565
554
Parameters
566
555
----------
567
- other : DataFrame or Scalar
568
- If DataFrame, must have same length and matching columns.
556
+ other : Scalar
569
557
"Scalar" here is defined implicitly by what scalar types are allowed
570
558
for the operation by the underling dtypes.
571
559
@@ -575,14 +563,13 @@ def __truediv__(self, other: DataFrame | Scalar) -> DataFrame:
575
563
"""
576
564
...
577
565
578
- def __floordiv__ (self , other : DataFrame | Scalar ) -> DataFrame :
566
+ def __floordiv__ (self , other : Scalar ) -> DataFrame :
579
567
"""
580
- Floor-divide (returns integers) this dataframe by `other` dataframe or scalar.
568
+ Floor-divide (returns integers) this dataframe by `other` scalar.
581
569
582
570
Parameters
583
571
----------
584
- other : DataFrame or Scalar
585
- If DataFrame, must have same length and matching columns.
572
+ other : Scalar
586
573
"Scalar" here is defined implicitly by what scalar types are allowed
587
574
for the operation by the underling dtypes.
588
575
@@ -592,7 +579,7 @@ def __floordiv__(self, other: DataFrame | Scalar) -> DataFrame:
592
579
"""
593
580
...
594
581
595
- def __pow__ (self , other : DataFrame | Scalar ) -> DataFrame :
582
+ def __pow__ (self , other : Scalar ) -> DataFrame :
596
583
"""
597
584
Raise this dataframe to the power of `other`.
598
585
@@ -602,8 +589,7 @@ def __pow__(self, other: DataFrame | Scalar) -> DataFrame:
602
589
603
590
Parameters
604
591
----------
605
- other : DataFrame or Scalar
606
- If DataFrame, must have same length and matching columns.
592
+ other : Scalar
607
593
"Scalar" here is defined implicitly by what scalar types are allowed
608
594
for the operation by the underling dtypes.
609
595
@@ -613,14 +599,13 @@ def __pow__(self, other: DataFrame | Scalar) -> DataFrame:
613
599
"""
614
600
...
615
601
616
- def __mod__ (self , other : DataFrame | Scalar ) -> DataFrame :
602
+ def __mod__ (self , other : Scalar ) -> DataFrame :
617
603
"""
618
604
Return modulus of this dataframe by `other` (`%` operator).
619
605
620
606
Parameters
621
607
----------
622
- other : DataFrame or Scalar
623
- If DataFrame, must have same length and matching columns.
608
+ other : Scalar
624
609
"Scalar" here is defined implicitly by what scalar types are allowed
625
610
for the operation by the underling dtypes.
626
611
@@ -630,20 +615,19 @@ def __mod__(self, other: DataFrame | Scalar) -> DataFrame:
630
615
"""
631
616
...
632
617
633
- def __divmod__ (self , other : DataFrame | Scalar ) -> tuple [DataFrame , DataFrame ]:
618
+ def __divmod__ (self , other : Scalar ) -> tuple [DataFrame , DataFrame ]:
634
619
"""
635
620
Return quotient and remainder of integer division. See `divmod` builtin function.
636
621
637
622
Parameters
638
623
----------
639
- other : DataFrame or Scalar
640
- If DataFrame, must have same length and matching columns.
624
+ other : Scalar
641
625
"Scalar" here is defined implicitly by what scalar types are allowed
642
626
for the operation by the underling dtypes.
643
627
644
628
Returns
645
629
-------
646
- A tuple of two DataFrame' s
630
+ A tuple of two ` DataFrame` s
647
631
"""
648
632
...
649
633
0 commit comments