Skip to content

Commit 731d27e

Browse files
committed
correct orders
1 parent 9179e63 commit 731d27e

File tree

6 files changed

+19
-22
lines changed

6 files changed

+19
-22
lines changed

pandas/core/frame.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,8 @@ def to_parquet(self, fname, engine='auto', compression='snappy',
20322032
@Substitution(header='Write out the column names. If a list of strings '
20332033
'is given, it is assumed to be aliases for the '
20342034
'column names')
2035-
@Substitution(shared_params=fmt.common_docstring,
2035+
@Substitution(shared_params1=fmt.common_docstring[:-320],
2036+
shared_params2=fmt.common_docstring[-315:-5],
20362037
returns=fmt.return_docstring)
20372038
def to_string(self, buf=None, columns=None, col_space=None, header=True,
20382039
index=True, na_rep='NaN', formatters=None, float_format=None,
@@ -2041,13 +2042,11 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
20412042
show_dimensions=False):
20422043
"""
20432044
Render a DataFrame to a console-friendly tabular output.
2044-
2045-
%(shared_params)s
2045+
%(shared_params1)s
20462046
line_width : int, optional
20472047
Width to wrap a line in characters.
2048-
2048+
%(shared_params2)s
20492049
%(returns)s
2050-
20512050
See Also
20522051
--------
20532052
to_html : Convert DataFrame to HTML.
@@ -2081,7 +2080,8 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
20812080
return result
20822081

20832082
@Substitution(header='whether to print column labels, default True')
2084-
@Substitution(shared_params=fmt.common_docstring,
2083+
@Substitution(shared_params1=fmt.common_docstring[:-320],
2084+
shared_params2=fmt.common_docstring[-315:-5],
20852085
returns=fmt.return_docstring)
20862086
def to_html(self, buf=None, columns=None, col_space=None, header=True,
20872087
index=True, na_rep='NaN', formatters=None, float_format=None,
@@ -2091,14 +2091,14 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True,
20912091
border=None, table_id=None):
20922092
"""
20932093
Render a DataFrame as an HTML table.
2094-
2095-
%(shared_params)s
2094+
%(shared_params1)s
20962095
bold_rows : boolean, default True
20972096
Make the row labels bold in the output
20982097
classes : str or list or tuple, default None
20992098
CSS class(es) to apply to the resulting html table
21002099
escape : boolean, default True
21012100
Convert the characters <, >, and & to HTML-safe sequences.
2101+
%(shared_params2)s
21022102
notebook : {True, False}, default False
21032103
Whether the generated HTML is for IPython Notebook.
21042104
decimal : string, default '.'
@@ -2116,9 +2116,7 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True,
21162116
A css id is included in the opening `<table>` tag if specified.
21172117
21182118
.. versionadded:: 0.23.0
2119-
21202119
%(returns)s
2121-
21222120
See Also
21232121
--------
21242122
to_string : Convert DataFrame to a string.

pandas/core/reshape/pivot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,12 @@ def crosstab(index, columns, values=None, rownames=None, colnames=None,
407407
values : array-like, optional
408408
Array of values to aggregate according to the factors.
409409
Requires `aggfunc` be specified.
410-
aggfunc : function, optional
411-
If specified, requires `values` be specified as well
412410
rownames : sequence, default None
413411
If passed, must match number of row arrays passed
414412
colnames : sequence, default None
415413
If passed, must match number of column arrays passed
414+
aggfunc : function, optional
415+
If specified, requires `values` be specified as well
416416
margins : boolean, default False
417417
Add row/column margins (subtotals)
418418
margins_name : string, default 'All'

pandas/core/window.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ class Window(_Window):
472472
on : string, optional
473473
For a DataFrame, column on which to calculate
474474
the rolling window, rather than the index
475+
axis : int or string, default 0
475476
closed : string, default None
476477
Make the interval closed on the 'right', 'left', 'both' or
477478
'neither' endpoints.
@@ -481,8 +482,6 @@ class Window(_Window):
481482
482483
.. versionadded:: 0.20.0
483484
484-
axis : int or string, default 0
485-
486485
Returns
487486
-------
488487
a Window or Rolling sub-classed for the particular operation

pandas/io/json/normalize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ def json_normalize(data, record_path=None, meta=None,
110110
assumed to be an array of records
111111
meta : list of paths (string or list of strings), default None
112112
Fields to use as metadata for each record in resulting table
113+
meta_prefix : string, default None
113114
record_prefix : string, default None
114115
If True, prefix records with dotted (?) path, e.g. foo.bar.field if
115116
path to records is ['foo', 'bar']
116-
meta_prefix : string, default None
117117
errors : {'raise', 'ignore'}, default 'raise'
118118
119119
* 'ignore' : will ignore KeyError if keys listed in meta are not

pandas/tseries/offsets.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -807,15 +807,15 @@ class CustomBusinessDay(_CustomMixin, BusinessDay):
807807
Parameters
808808
----------
809809
n : int, default 1
810-
offset : timedelta, default timedelta(0)
811810
normalize : bool, default False
812811
Normalize start/end dates to midnight before generating date range
813812
weekmask : str, Default 'Mon Tue Wed Thu Fri'
814813
weekmask of valid business days, passed to ``numpy.busdaycalendar``
815814
holidays : list
816815
list/array of dates to exclude from the set of valid business days,
817816
passed to ``numpy.busdaycalendar``
818-
calendar : pd.HolidayCalendar or np.busdaycalendar
817+
calendar : pd.HolidayCalendar or np.
818+
offset : timedelta, default timedelta(0)
819819
"""
820820
_prefix = 'C'
821821
_attributes = frozenset(['n', 'normalize',
@@ -958,7 +958,6 @@ class _CustomBusinessMonth(_CustomMixin, BusinessMixin, MonthOffset):
958958
Parameters
959959
----------
960960
n : int, default 1
961-
offset : timedelta, default timedelta(0)
962961
normalize : bool, default False
963962
Normalize start/end dates to midnight before generating date range
964963
weekmask : str, Default 'Mon Tue Wed Thu Fri'
@@ -967,6 +966,7 @@ class _CustomBusinessMonth(_CustomMixin, BusinessMixin, MonthOffset):
967966
list/array of dates to exclude from the set of valid business days,
968967
passed to ``numpy.busdaycalendar``
969968
calendar : pd.HolidayCalendar or np.busdaycalendar
969+
offset : timedelta, default timedelta(0)
970970
"""
971971
_attributes = frozenset(['n', 'normalize',
972972
'weekmask', 'holidays', 'calendar', 'offset'])

pandas/util/testing.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1222,18 +1222,18 @@ def assert_series_equal(left, right, check_dtype=True,
12221222
check_less_precise : bool or int, default False
12231223
Specify comparison precision. Only used when check_exact is False.
12241224
5 digits (False) or 3 digits (True) after decimal points are compared.
1225-
If int, then specify the digits to compare
1226-
check_exact : bool, default False
1227-
Whether to compare number exactly.
1225+
If int, then specify the digits to compare.
12281226
check_names : bool, default True
12291227
Whether to check the Series and Index names attribute.
1228+
check_exact : bool, default False
1229+
Whether to compare number exactly.
12301230
check_datetimelike_compat : bool, default False
12311231
Compare datetime-like which is comparable ignoring dtype.
12321232
check_categorical : bool, default True
12331233
Whether to compare internal Categorical exactly.
12341234
obj : str, default 'Series'
12351235
Specify object name being compared, internally used to show appropriate
1236-
assertion message
1236+
assertion message.
12371237
"""
12381238
__tracebackhide__ = True
12391239

0 commit comments

Comments
 (0)