Skip to content

Commit a12cea5

Browse files
committed
Remove 'by' docstring from Series.sort_values
1 parent 67f0ab0 commit a12cea5

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

pandas/core/frame.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@
6868
# ---------------------------------------------------------------------
6969
# Docstring templates
7070

71-
_shared_doc_kwargs = dict(axes='index, columns', klass='DataFrame',
72-
axes_single_arg="{0, 1, 'index', 'columns'}")
71+
_shared_doc_kwargs = dict(
72+
axes='index, columns', klass='DataFrame',
73+
axes_single_arg="{0, 1, 'index', 'columns'}",
74+
optional_by="""by : str or list of str
75+
Name or list of names which refer to the axis items.""")
7376

7477
_numeric_only_doc = """numeric_only : boolean, default None
7578
Include only float, int, boolean data. If None, will attempt to use

pandas/core/generic.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@
3737
# goal is to be able to define the docs close to function, while still being
3838
# able to share
3939
_shared_docs = dict()
40-
_shared_doc_kwargs = dict(axes='keywords for axes', klass='NDFrame',
41-
axes_single_arg='int or labels for object',
42-
args_transpose='axes to permute (int or label for'
43-
' object)')
40+
_shared_doc_kwargs = dict(
41+
axes='keywords for axes', klass='NDFrame',
42+
axes_single_arg='int or labels for object',
43+
args_transpose='axes to permute (int or label for object)',
44+
optional_by="""by : str or list of str
45+
Name or list of names which refer to the axis items.""")
4446

4547

4648
def is_dictlike(x):
@@ -1956,8 +1958,7 @@ def add_suffix(self, suffix):
19561958
.. versionadded:: 0.17.0
19571959
19581960
Parameters
1959-
----------
1960-
by : string name or list of names which refer to the axis items
1961+
----------%(optional_by)s
19611962
axis : %(axes)s to direct sorting
19621963
ascending : bool or list of bool
19631964
Sort ascending vs. descending. Specify list for multiple sort

pandas/core/series.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
axes='index', klass='Series', axes_single_arg="{0, 'index'}",
6363
inplace="""inplace : boolean, default False
6464
If True, performs operation inplace and returns None.""",
65-
duplicated='Series')
65+
duplicated='Series',
66+
optional_by='')
6667

6768

6869
def _coerce_method(converter):

0 commit comments

Comments
 (0)