Skip to content

Commit 68603b1

Browse files
DOC: Fix SA04 errors in docstrings #28792 (#32182)
1 parent 3e5fe8e commit 68603b1

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

pandas/core/base.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,8 @@ def argmin(self, axis=None, skipna=True, *args, **kwargs):
10351035
10361036
See Also
10371037
--------
1038-
numpy.ndarray.argmin
1038+
numpy.ndarray.argmin : Return indices of the minimum values along
1039+
the given axis.
10391040
"""
10401041
nv.validate_minmax_axis(axis)
10411042
nv.validate_argmax_with_skipna(skipna, args, kwargs)
@@ -1055,7 +1056,8 @@ def tolist(self):
10551056
10561057
See Also
10571058
--------
1058-
numpy.ndarray.tolist
1059+
numpy.ndarray.tolist : Return the array as an a.ndim-levels deep
1060+
nested list of Python scalars.
10591061
"""
10601062
if not isinstance(self._values, np.ndarray):
10611063
# check for ndarray instead of dtype to catch DTA/TDA
@@ -1402,7 +1404,8 @@ def memory_usage(self, deep=False):
14021404
14031405
See Also
14041406
--------
1405-
numpy.ndarray.nbytes
1407+
numpy.ndarray.nbytes : Total bytes consumed by the elements of the
1408+
array.
14061409
14071410
Notes
14081411
-----
@@ -1473,8 +1476,8 @@ def factorize(self, sort=False, na_sentinel=-1):
14731476
14741477
See Also
14751478
--------
1476-
sort_values
1477-
numpy.searchsorted
1479+
sort_values : Sort by the values along either axis.
1480+
numpy.searchsorted : Similar method from NumPy.
14781481
14791482
Notes
14801483
-----

pandas/core/computation/eval.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ def eval(
266266
267267
See Also
268268
--------
269-
DataFrame.query
270-
DataFrame.eval
269+
DataFrame.query : Evaluates a boolean expression to query the columns
270+
of a frame.
271+
DataFrame.eval : Evaluate a string describing operations on
272+
DataFrame columns.
271273
272274
Notes
273275
-----

pandas/core/generic.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -1753,8 +1753,9 @@ def empty(self) -> bool_t:
17531753
17541754
See Also
17551755
--------
1756-
Series.dropna
1757-
DataFrame.dropna
1756+
Series.dropna : Return series without null values.
1757+
DataFrame.dropna : Return DataFrame with labels on given axis omitted
1758+
where (all or any) data are missing.
17581759
17591760
Notes
17601761
-----
@@ -2173,7 +2174,7 @@ def to_json(
21732174
21742175
See Also
21752176
--------
2176-
read_json
2177+
read_json : Convert a JSON string to pandas object.
21772178
21782179
Notes
21792180
-----
@@ -4452,7 +4453,8 @@ def filter(
44524453
44534454
See Also
44544455
--------
4455-
DataFrame.loc
4456+
DataFrame.loc : Access a group of rows and columns
4457+
by label(s) or a boolean array.
44564458
44574459
Notes
44584460
-----
@@ -4884,9 +4886,10 @@ def sample(
48844886
48854887
See Also
48864888
--------
4887-
DataFrame.apply
4888-
DataFrame.applymap
4889-
Series.map
4889+
DataFrame.apply : Apply a function along input axis of DataFrame.
4890+
DataFrame.applymap : Apply a function elementwise on a whole DataFrame.
4891+
Series.map : Apply a mapping correspondence on a
4892+
:class:`~pandas.Series`.
48904893
48914894
Notes
48924895
-----

0 commit comments

Comments
 (0)