Skip to content

Commit 4165872

Browse files
committed
💡 Fix issues with style of docstring.
1 parent 7da5bb6 commit 4165872

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pandas/core/generic.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -7115,14 +7115,14 @@ def _tz_localize(ax, tz, ambiguous):
71157115
# Numeric Methods
71167116
def abs(self):
71177117
"""
7118-
Return a Series/DataFrame with absolute numeric value of each object.
7118+
Return a Series/DataFrame with absolute numeric value of each element.
71197119
7120-
This function only applies to objects that are all numeric.
7120+
This function only applies to elements that are all numeric.
71217121
71227122
Returns
71237123
-------
71247124
abs
7125-
Series/DataFrame containing the absolute value of each object.
7125+
Series/DataFrame containing the absolute value of each element.
71267126
71277127
Notes
71287128
-----
@@ -7149,8 +7149,7 @@ def abs(self):
71497149
dtype: float64
71507150
71517151
Select rows with data closest to certian value using argsort (from
7152-
`StackOverflow
7153-
<http://stackoverflow.com/questions/17758023/return-rows-in-a-dataframe-closest-to-a-user-defined-number>`__).
7152+
`StackOverflow <https://stackoverflow.com/a/17758115>`__).
71547153
71557154
>>> df = pd.DataFrame({
71567155
... 'a': [4, 5, 6, 7],
@@ -7163,8 +7162,7 @@ def abs(self):
71637162
1 5 20 50
71647163
2 6 30 -30
71657164
3 7 40 -50
7166-
>>> a_value = 43.0
7167-
>>> df.loc[(df.c - a_value).abs().argsort()]
7165+
>>> df.loc[(df.c - 43).abs().argsort()]
71687166
a b c
71697167
1 5 20 50
71707168
0 4 10 100

0 commit comments

Comments
 (0)