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