Skip to content

Commit 9175387

Browse files
dylanchasedatapythonista
authored andcommitted
DOC: Fixing see also description formatting in docstrings (#24561)
1 parent 1e6b4b7 commit 9175387

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

pandas/_libs/interval.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ cdef class Interval(IntervalMixin):
389389
390390
See Also
391391
--------
392-
IntervalArray.overlaps : The corresponding method for IntervalArray
393-
IntervalIndex.overlaps : The corresponding method for IntervalIndex
392+
IntervalArray.overlaps : The corresponding method for IntervalArray.
393+
IntervalIndex.overlaps : The corresponding method for IntervalIndex.
394394
395395
Examples
396396
--------

pandas/_libs/tslibs/period.pyx

+4-5
Original file line numberDiff line numberDiff line change
@@ -1830,9 +1830,8 @@ cdef class _Period(object):
18301830
18311831
See Also
18321832
--------
1833-
Period.dayofweek : Get the day of the week
1834-
1835-
Period.dayofyear : Get the day of the year
1833+
Period.dayofweek : Get the day of the week.
1834+
Period.dayofyear : Get the day of the year.
18361835
18371836
Examples
18381837
--------
@@ -2189,8 +2188,8 @@ cdef class _Period(object):
21892188
21902189
See Also
21912190
--------
2192-
Period.days_in_month : Return the days of the month
2193-
Period.dayofyear : Return the day of the year
2191+
Period.days_in_month : Return the days of the month.
2192+
Period.dayofyear : Return the day of the year.
21942193
21952194
Examples
21962195
--------

pandas/core/strings.py

+19-17
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,9 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan):
660660
661661
See Also
662662
--------
663-
contains : analogous, but less strict, relying on re.search instead of
664-
re.match
665-
extract : extract matched groups
663+
contains : Analogous, but less strict, relying on re.search instead of
664+
re.match.
665+
extract : Extract matched groups.
666666
"""
667667
if not case:
668668
flags |= re.IGNORECASE
@@ -1255,13 +1255,13 @@ def str_pad(arr, width, side='left', fillchar=' '):
12551255
12561256
See Also
12571257
--------
1258-
Series.str.rjust: Fills the left side of strings with an arbitrary
1258+
Series.str.rjust : Fills the left side of strings with an arbitrary
12591259
character. Equivalent to ``Series.str.pad(side='left')``.
1260-
Series.str.ljust: Fills the right side of strings with an arbitrary
1260+
Series.str.ljust : Fills the right side of strings with an arbitrary
12611261
character. Equivalent to ``Series.str.pad(side='right')``.
1262-
Series.str.center: Fills boths sides of strings with an arbitrary
1262+
Series.str.center : Fills boths sides of strings with an arbitrary
12631263
character. Equivalent to ``Series.str.pad(side='both')``.
1264-
Series.str.zfill: Pad strings in the Series/Index by prepending '0'
1264+
Series.str.zfill : Pad strings in the Series/Index by prepending '0'
12651265
character. Equivalent to ``Series.str.pad(side='left', fillchar='0')``.
12661266
12671267
Examples
@@ -2485,7 +2485,8 @@ def rsplit(self, pat=None, n=-1, expand=False):
24852485
'side': 'first',
24862486
'return': '3 elements containing the string itself, followed by two '
24872487
'empty strings',
2488-
'also': 'rpartition : Split the string at the last occurrence of `sep`'
2488+
'also': 'rpartition : Split the string at the last occurrence of '
2489+
'`sep`.'
24892490
})
24902491
@deprecate_kwarg(old_arg_name='pat', new_arg_name='sep')
24912492
def partition(self, sep=' ', expand=True):
@@ -2497,7 +2498,8 @@ def partition(self, sep=' ', expand=True):
24972498
'side': 'last',
24982499
'return': '3 elements containing two empty strings, followed by the '
24992500
'string itself',
2500-
'also': 'partition : Split the string at the first occurrence of `sep`'
2501+
'also': 'partition : Split the string at the first occurrence of '
2502+
'`sep`.'
25012503
})
25022504
@deprecate_kwarg(old_arg_name='pat', new_arg_name='sep')
25032505
def rpartition(self, sep=' ', expand=True):
@@ -2593,13 +2595,13 @@ def zfill(self, width):
25932595
25942596
See Also
25952597
--------
2596-
Series.str.rjust: Fills the left side of strings with an arbitrary
2598+
Series.str.rjust : Fills the left side of strings with an arbitrary
25972599
character.
2598-
Series.str.ljust: Fills the right side of strings with an arbitrary
2600+
Series.str.ljust : Fills the right side of strings with an arbitrary
25992601
character.
2600-
Series.str.pad: Fills the specified sides of strings with an arbitrary
2602+
Series.str.pad : Fills the specified sides of strings with an arbitrary
26012603
character.
2602-
Series.str.center: Fills boths sides of strings with an arbitrary
2604+
Series.str.center : Fills boths sides of strings with an arbitrary
26032605
character.
26042606
26052607
Notes
@@ -2793,14 +2795,14 @@ def extractall(self, pat, flags=0):
27932795

27942796
@Appender(_shared_docs['find'] %
27952797
dict(side='lowest', method='find',
2796-
also='rfind : Return highest indexes in each strings'))
2798+
also='rfind : Return highest indexes in each strings.'))
27972799
def find(self, sub, start=0, end=None):
27982800
result = str_find(self._parent, sub, start=start, end=end, side='left')
27992801
return self._wrap_result(result)
28002802

28012803
@Appender(_shared_docs['find'] %
28022804
dict(side='highest', method='rfind',
2803-
also='find : Return lowest indexes in each strings'))
2805+
also='find : Return lowest indexes in each strings.'))
28042806
def rfind(self, sub, start=0, end=None):
28052807
result = str_find(self._parent, sub,
28062808
start=start, end=end, side='right')
@@ -2852,15 +2854,15 @@ def normalize(self, form):
28522854

28532855
@Appender(_shared_docs['index'] %
28542856
dict(side='lowest', similar='find', method='index',
2855-
also='rindex : Return highest indexes in each strings'))
2857+
also='rindex : Return highest indexes in each strings.'))
28562858
def index(self, sub, start=0, end=None):
28572859
result = str_index(self._parent, sub,
28582860
start=start, end=end, side='left')
28592861
return self._wrap_result(result)
28602862

28612863
@Appender(_shared_docs['index'] %
28622864
dict(side='highest', similar='rfind', method='rindex',
2863-
also='index : Return lowest indexes in each strings'))
2865+
also='index : Return lowest indexes in each strings.'))
28642866
def rindex(self, sub, start=0, end=None):
28652867
result = str_index(self._parent, sub,
28662868
start=start, end=end, side='right')

0 commit comments

Comments
 (0)