@@ -3443,10 +3443,10 @@ def casefold(self):
3443
3443
Series or Index of bool
3444
3444
Series or Index of boolean values with the same length as the original
3445
3445
Series/Index.
3446
-
3446
+ """
3447
+ _shared_docs ["isalpha" ] = """
3447
3448
See Also
3448
3449
--------
3449
- Series.str.isalpha : Check whether all characters are alphabetic.
3450
3450
Series.str.isnumeric : Check whether all characters are numeric.
3451
3451
Series.str.isalnum : Check whether all characters are alphanumeric.
3452
3452
Series.str.isdigit : Check whether all characters are digits.
@@ -3458,24 +3458,56 @@ def casefold(self):
3458
3458
3459
3459
Examples
3460
3460
--------
3461
- **Checks for Alphabetic and Numeric Characters**
3462
3461
3463
3462
>>> s1 = pd.Series(['one', 'one1', '1', ''])
3464
-
3465
3463
>>> s1.str.isalpha()
3466
3464
0 True
3467
3465
1 False
3468
3466
2 False
3469
3467
3 False
3470
3468
dtype: bool
3469
+ """
3470
+ _shared_docs ["isnumeric" ] = """
3471
+ See Also
3472
+ --------
3473
+ Series.str.isalpha : Check whether all characters are alphabetic.
3474
+ Series.str.isalnum : Check whether all characters are alphanumeric.
3475
+ Series.str.isdigit : Check whether all characters are digits.
3476
+ Series.str.isdecimal : Check whether all characters are decimal.
3477
+ Series.str.isspace : Check whether all characters are whitespace.
3478
+ Series.str.islower : Check whether all characters are lowercase.
3479
+ Series.str.isupper : Check whether all characters are uppercase.
3480
+ Series.str.istitle : Check whether all characters are titlecase.
3481
+
3482
+ Examples
3483
+ --------
3484
+ The ``s.str.isnumeric`` method is the same as ``s3.str.isdigit`` but
3485
+ also includes other characters that can represent quantities such as
3486
+ unicode fractions.
3471
3487
3488
+ >>> s1 = pd.Series(['one', 'one1', '1', ''])
3472
3489
>>> s1.str.isnumeric()
3473
3490
0 False
3474
3491
1 False
3475
3492
2 True
3476
3493
3 False
3477
3494
dtype: bool
3495
+ """
3496
+ _shared_docs ["isalnum" ] = """
3497
+ See Also
3498
+ --------
3499
+ Series.str.isalpha : Check whether all characters are alphabetic.
3500
+ Series.str.isnumeric : Check whether all characters are numeric.
3501
+ Series.str.isdigit : Check whether all characters are digits.
3502
+ Series.str.isdecimal : Check whether all characters are decimal.
3503
+ Series.str.isspace : Check whether all characters are whitespace.
3504
+ Series.str.islower : Check whether all characters are lowercase.
3505
+ Series.str.isupper : Check whether all characters are uppercase.
3506
+ Series.str.istitle : Check whether all characters are titlecase.
3478
3507
3508
+ Examples
3509
+ --------
3510
+ >>> s1 = pd.Series(['one', 'one1', '1', ''])
3479
3511
>>> s1.str.isalnum()
3480
3512
0 True
3481
3513
1 True
@@ -3492,78 +3524,147 @@ def casefold(self):
3492
3524
1 False
3493
3525
2 False
3494
3526
dtype: bool
3527
+ """
3528
+ _shared_docs ["isdecimal" ] = """
3529
+ See Also
3530
+ --------
3531
+ Series.str.isalpha : Check whether all characters are alphabetic.
3532
+ Series.str.isnumeric : Check whether all characters are numeric.
3533
+ Series.str.isalnum : Check whether all characters are alphanumeric.
3534
+ Series.str.isdigit : Check whether all characters are digits.
3535
+ Series.str.isspace : Check whether all characters are whitespace.
3536
+ Series.str.islower : Check whether all characters are lowercase.
3537
+ Series.str.isupper : Check whether all characters are uppercase.
3538
+ Series.str.istitle : Check whether all characters are titlecase.
3495
3539
3496
- **More Detailed Checks for Numeric Characters**
3497
-
3498
- There are several different but overlapping sets of numeric characters that
3499
- can be checked for .
3540
+ Examples
3541
+ --------
3542
+ The ``s3.str.isdecimal`` method checks for characters used to form
3543
+ numbers in base 10 .
3500
3544
3501
3545
>>> s3 = pd.Series(['23', '³', '⅕', ''])
3502
-
3503
- The ``s3.str.isdecimal`` method checks for characters used to form numbers
3504
- in base 10.
3505
-
3506
3546
>>> s3.str.isdecimal()
3507
3547
0 True
3508
3548
1 False
3509
3549
2 False
3510
3550
3 False
3511
3551
dtype: bool
3552
+ """
3553
+ _shared_docs ["isdigit" ] = """
3554
+ See Also
3555
+ --------
3556
+ Series.str.isalpha : Check whether all characters are alphabetic.
3557
+ Series.str.isnumeric : Check whether all characters are numeric.
3558
+ Series.str.isalnum : Check whether all characters are alphanumeric.
3559
+ Series.str.isdecimal : Check whether all characters are decimal.
3560
+ Series.str.isspace : Check whether all characters are whitespace.
3561
+ Series.str.islower : Check whether all characters are lowercase.
3562
+ Series.str.isupper : Check whether all characters are uppercase.
3563
+ Series.str.istitle : Check whether all characters are titlecase.
3512
3564
3513
- The ``s.str.isdigit`` method is the same as ``s3.str.isdecimal`` but also
3514
- includes special digits, like superscripted and subscripted digits in
3515
- unicode.
3565
+ Examples
3566
+ --------
3567
+ Similar to ``str.isdecimal`` but also includes special digits, like
3568
+ superscripted and subscripted digits in unicode.
3516
3569
3570
+ >>> s3 = pd.Series(['23', '³', '⅕', ''])
3517
3571
>>> s3.str.isdigit()
3518
3572
0 True
3519
3573
1 True
3520
3574
2 False
3521
3575
3 False
3522
3576
dtype: bool
3577
+ """
3523
3578
3524
- The ``s.str.isnumeric`` method is the same as ``s3.str.isdigit`` but also
3525
- includes other characters that can represent quantities such as unicode
3526
- fractions.
3527
-
3528
- >>> s3.str.isnumeric()
3529
- 0 True
3530
- 1 True
3531
- 2 True
3532
- 3 False
3533
- dtype: bool
3579
+ _shared_docs ["isspace" ] = """
3580
+ See Also
3581
+ --------
3582
+ Series.str.isalpha : Check whether all characters are alphabetic.
3583
+ Series.str.isnumeric : Check whether all characters are numeric.
3584
+ Series.str.isalnum : Check whether all characters are alphanumeric.
3585
+ Series.str.isdigit : Check whether all characters are digits.
3586
+ Series.str.isdecimal : Check whether all characters are decimal.
3587
+ Series.str.islower : Check whether all characters are lowercase.
3588
+ Series.str.isupper : Check whether all characters are uppercase.
3589
+ Series.str.istitle : Check whether all characters are titlecase.
3534
3590
3535
- **Checks for Whitespace**
3591
+ Examples
3592
+ --------
3536
3593
3537
3594
>>> s4 = pd.Series([' ', '\\ t\\ r\\ n ', ''])
3538
3595
>>> s4.str.isspace()
3539
3596
0 True
3540
3597
1 True
3541
3598
2 False
3542
3599
dtype: bool
3600
+ """
3601
+ _shared_docs ["islower" ] = """
3602
+ See Also
3603
+ --------
3604
+ Series.str.isalpha : Check whether all characters are alphabetic.
3605
+ Series.str.isnumeric : Check whether all characters are numeric.
3606
+ Series.str.isalnum : Check whether all characters are alphanumeric.
3607
+ Series.str.isdigit : Check whether all characters are digits.
3608
+ Series.str.isdecimal : Check whether all characters are decimal.
3609
+ Series.str.isspace : Check whether all characters are whitespace.
3610
+ Series.str.isupper : Check whether all characters are uppercase.
3611
+ Series.str.istitle : Check whether all characters are titlecase.
3543
3612
3544
- **Checks for Character Case**
3613
+ Examples
3614
+ --------
3545
3615
3546
3616
>>> s5 = pd.Series(['leopard', 'Golden Eagle', 'SNAKE', ''])
3547
-
3548
3617
>>> s5.str.islower()
3549
3618
0 True
3550
3619
1 False
3551
3620
2 False
3552
3621
3 False
3553
3622
dtype: bool
3623
+ """
3624
+
3625
+ _shared_docs ["isupper" ] = """
3626
+ See Also
3627
+ --------
3628
+ Series.str.isalpha : Check whether all characters are alphabetic.
3629
+ Series.str.isnumeric : Check whether all characters are numeric.
3630
+ Series.str.isalnum : Check whether all characters are alphanumeric.
3631
+ Series.str.isdigit : Check whether all characters are digits.
3632
+ Series.str.isdecimal : Check whether all characters are decimal.
3633
+ Series.str.isspace : Check whether all characters are whitespace.
3634
+ Series.str.islower : Check whether all characters are lowercase.
3635
+ Series.str.istitle : Check whether all characters are titlecase.
3554
3636
3637
+ Examples
3638
+ --------
3639
+
3640
+ >>> s5 = pd.Series(['leopard', 'Golden Eagle', 'SNAKE', ''])
3555
3641
>>> s5.str.isupper()
3556
3642
0 False
3557
3643
1 False
3558
3644
2 True
3559
3645
3 False
3560
3646
dtype: bool
3647
+ """
3648
+ _shared_docs ["istitle" ] = """
3649
+ See Also
3650
+ --------
3651
+ Series.str.isalpha : Check whether all characters are alphabetic.
3652
+ Series.str.isnumeric : Check whether all characters are numeric.
3653
+ Series.str.isalnum : Check whether all characters are alphanumeric.
3654
+ Series.str.isdigit : Check whether all characters are digits.
3655
+ Series.str.isdecimal : Check whether all characters are decimal.
3656
+ Series.str.isspace : Check whether all characters are whitespace.
3657
+ Series.str.islower : Check whether all characters are lowercase.
3658
+ Series.str.isupper : Check whether all characters are uppercase.
3561
3659
3660
+ Examples
3661
+ ------------
3562
3662
The ``s5.str.istitle`` method checks for whether all words are in title
3563
3663
case (whether only the first letter of each word is capitalized). Words are
3564
3664
assumed to be as any sequence of non-numeric characters separated by
3565
3665
whitespace characters.
3566
3666
3667
+ >>> s5 = pd.Series(['leopard', 'Golden Eagle', 'SNAKE', ''])
3567
3668
>>> s5.str.istitle()
3568
3669
0 False
3569
3670
1 True
@@ -3583,31 +3684,49 @@ def casefold(self):
3583
3684
# force _noarg_wrapper return type with dtype=np.dtype(bool) (GH 29624)
3584
3685
3585
3686
isalnum = _map_and_wrap (
3586
- "isalnum" , docstring = _shared_docs ["ismethods" ] % _doc_args ["isalnum" ]
3687
+ "isalnum" ,
3688
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["isalnum" ]
3689
+ + _shared_docs ["isalnum" ],
3587
3690
)
3588
3691
isalpha = _map_and_wrap (
3589
- "isalpha" , docstring = _shared_docs ["ismethods" ] % _doc_args ["isalpha" ]
3692
+ "isalpha" ,
3693
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["isalpha" ]
3694
+ + _shared_docs ["isalpha" ],
3590
3695
)
3591
3696
isdigit = _map_and_wrap (
3592
- "isdigit" , docstring = _shared_docs ["ismethods" ] % _doc_args ["isdigit" ]
3697
+ "isdigit" ,
3698
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["isdigit" ]
3699
+ + _shared_docs ["isdigit" ],
3593
3700
)
3594
3701
isspace = _map_and_wrap (
3595
- "isspace" , docstring = _shared_docs ["ismethods" ] % _doc_args ["isspace" ]
3702
+ "isspace" ,
3703
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["isspace" ]
3704
+ + _shared_docs ["isspace" ],
3596
3705
)
3597
3706
islower = _map_and_wrap (
3598
- "islower" , docstring = _shared_docs ["ismethods" ] % _doc_args ["islower" ]
3707
+ "islower" ,
3708
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["islower" ]
3709
+ + _shared_docs ["islower" ],
3599
3710
)
3600
3711
isupper = _map_and_wrap (
3601
- "isupper" , docstring = _shared_docs ["ismethods" ] % _doc_args ["isupper" ]
3712
+ "isupper" ,
3713
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["isupper" ]
3714
+ + _shared_docs ["isupper" ],
3602
3715
)
3603
3716
istitle = _map_and_wrap (
3604
- "istitle" , docstring = _shared_docs ["ismethods" ] % _doc_args ["istitle" ]
3717
+ "istitle" ,
3718
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["istitle" ]
3719
+ + _shared_docs ["istitle" ],
3605
3720
)
3606
3721
isnumeric = _map_and_wrap (
3607
- "isnumeric" , docstring = _shared_docs ["ismethods" ] % _doc_args ["isnumeric" ]
3722
+ "isnumeric" ,
3723
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["isnumeric" ]
3724
+ + _shared_docs ["isnumeric" ],
3608
3725
)
3609
3726
isdecimal = _map_and_wrap (
3610
- "isdecimal" , docstring = _shared_docs ["ismethods" ] % _doc_args ["isdecimal" ]
3727
+ "isdecimal" ,
3728
+ docstring = _shared_docs ["ismethods" ] % _doc_args ["isdecimal" ]
3729
+ + _shared_docs ["isdecimal" ],
3611
3730
)
3612
3731
3613
3732
0 commit comments