@@ -488,6 +488,83 @@ def _get_op_name(op, special):
488
488
dtype: float64
489
489
"""
490
490
491
+ _floordiv_example_SERIES = """
492
+ Examples
493
+ --------
494
+ >>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
495
+ >>> a
496
+ a 1.0
497
+ b 1.0
498
+ c 1.0
499
+ d NaN
500
+ dtype: float64
501
+ >>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
502
+ >>> b
503
+ a 1.0
504
+ b NaN
505
+ d 1.0
506
+ e NaN
507
+ dtype: float64
508
+ >>> a.floordiv(b, fill_value=0)
509
+ a 1.0
510
+ b NaN
511
+ c NaN
512
+ d 0.0
513
+ e NaN
514
+ dtype: float64
515
+ """
516
+
517
+ _mod_example_SERIES = """
518
+ Examples
519
+ --------
520
+ >>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
521
+ >>> a
522
+ a 1.0
523
+ b 1.0
524
+ c 1.0
525
+ d NaN
526
+ dtype: float64
527
+ >>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
528
+ >>> b
529
+ a 1.0
530
+ b NaN
531
+ d 1.0
532
+ e NaN
533
+ dtype: float64
534
+ >>> a.mod(b, fill_value=0)
535
+ a 0.0
536
+ b NaN
537
+ c NaN
538
+ d 0.0
539
+ e NaN
540
+ dtype: float64
541
+ """
542
+ _pow_example_SERIES = """
543
+ Examples
544
+ --------
545
+ >>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
546
+ >>> a
547
+ a 1.0
548
+ b 1.0
549
+ c 1.0
550
+ d NaN
551
+ dtype: float64
552
+ >>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
553
+ >>> b
554
+ a 1.0
555
+ b NaN
556
+ d 1.0
557
+ e NaN
558
+ dtype: float64
559
+ >>> a.pow(b, fill_value=0)
560
+ a 1.0
561
+ b 1.0
562
+ c 1.0
563
+ d 0.0
564
+ e NaN
565
+ dtype: float64
566
+ """
567
+
491
568
_op_descriptions = {
492
569
# Arithmetic Operators
493
570
'add' : {'op' : '+' ,
@@ -506,11 +583,11 @@ def _get_op_name(op, special):
506
583
'mod' : {'op' : '%' ,
507
584
'desc' : 'Modulo' ,
508
585
'reverse' : 'rmod' ,
509
- 'series_examples' : None },
586
+ 'series_examples' : _mod_example_SERIES },
510
587
'pow' : {'op' : '**' ,
511
588
'desc' : 'Exponential power' ,
512
589
'reverse' : 'rpow' ,
513
- 'series_examples' : None ,
590
+ 'series_examples' : _pow_example_SERIES ,
514
591
'df_examples' : None },
515
592
'truediv' : {'op' : '/' ,
516
593
'desc' : 'Floating division' ,
@@ -520,7 +597,7 @@ def _get_op_name(op, special):
520
597
'floordiv' : {'op' : '//' ,
521
598
'desc' : 'Integer division' ,
522
599
'reverse' : 'rfloordiv' ,
523
- 'series_examples' : None ,
600
+ 'series_examples' : _floordiv_example_SERIES ,
524
601
'df_examples' : None },
525
602
'divmod' : {'op' : 'divmod' ,
526
603
'desc' : 'Integer division and modulo' ,
0 commit comments