Skip to content

Commit

Permalink
correct orders
Browse files Browse the repository at this point in the history
  • Loading branch information
thoo committed Nov 10, 2018
1 parent 9179e63 commit 731d27e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
18 changes: 8 additions & 10 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,8 @@ def to_parquet(self, fname, engine='auto', compression='snappy',
@Substitution(header='Write out the column names. If a list of strings '
'is given, it is assumed to be aliases for the '
'column names')
@Substitution(shared_params=fmt.common_docstring,
@Substitution(shared_params1=fmt.common_docstring[:-320],
shared_params2=fmt.common_docstring[-315:-5],
returns=fmt.return_docstring)
def to_string(self, buf=None, columns=None, col_space=None, header=True,
index=True, na_rep='NaN', formatters=None, float_format=None,
Expand All @@ -2041,13 +2042,11 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
show_dimensions=False):
"""
Render a DataFrame to a console-friendly tabular output.
%(shared_params)s
%(shared_params1)s
line_width : int, optional
Width to wrap a line in characters.
%(shared_params2)s
%(returns)s
See Also
--------
to_html : Convert DataFrame to HTML.
Expand Down Expand Up @@ -2081,7 +2080,8 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
return result

@Substitution(header='whether to print column labels, default True')
@Substitution(shared_params=fmt.common_docstring,
@Substitution(shared_params1=fmt.common_docstring[:-320],
shared_params2=fmt.common_docstring[-315:-5],
returns=fmt.return_docstring)
def to_html(self, buf=None, columns=None, col_space=None, header=True,
index=True, na_rep='NaN', formatters=None, float_format=None,
Expand All @@ -2091,14 +2091,14 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True,
border=None, table_id=None):
"""
Render a DataFrame as an HTML table.
%(shared_params)s
%(shared_params1)s
bold_rows : boolean, default True
Make the row labels bold in the output
classes : str or list or tuple, default None
CSS class(es) to apply to the resulting html table
escape : boolean, default True
Convert the characters <, >, and & to HTML-safe sequences.
%(shared_params2)s
notebook : {True, False}, default False
Whether the generated HTML is for IPython Notebook.
decimal : string, default '.'
Expand All @@ -2116,9 +2116,7 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True,
A css id is included in the opening `<table>` tag if specified.
.. versionadded:: 0.23.0
%(returns)s
See Also
--------
to_string : Convert DataFrame to a string.
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/reshape/pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,12 @@ def crosstab(index, columns, values=None, rownames=None, colnames=None,
values : array-like, optional
Array of values to aggregate according to the factors.
Requires `aggfunc` be specified.
aggfunc : function, optional
If specified, requires `values` be specified as well
rownames : sequence, default None
If passed, must match number of row arrays passed
colnames : sequence, default None
If passed, must match number of column arrays passed
aggfunc : function, optional
If specified, requires `values` be specified as well
margins : boolean, default False
Add row/column margins (subtotals)
margins_name : string, default 'All'
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ class Window(_Window):
on : string, optional
For a DataFrame, column on which to calculate
the rolling window, rather than the index
axis : int or string, default 0
closed : string, default None
Make the interval closed on the 'right', 'left', 'both' or
'neither' endpoints.
Expand All @@ -481,8 +482,6 @@ class Window(_Window):
.. versionadded:: 0.20.0
axis : int or string, default 0
Returns
-------
a Window or Rolling sub-classed for the particular operation
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/json/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ def json_normalize(data, record_path=None, meta=None,
assumed to be an array of records
meta : list of paths (string or list of strings), default None
Fields to use as metadata for each record in resulting table
meta_prefix : string, default None
record_prefix : string, default None
If True, prefix records with dotted (?) path, e.g. foo.bar.field if
path to records is ['foo', 'bar']
meta_prefix : string, default None
errors : {'raise', 'ignore'}, default 'raise'
* 'ignore' : will ignore KeyError if keys listed in meta are not
Expand Down
6 changes: 3 additions & 3 deletions pandas/tseries/offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,15 +807,15 @@ class CustomBusinessDay(_CustomMixin, BusinessDay):
Parameters
----------
n : int, default 1
offset : timedelta, default timedelta(0)
normalize : bool, default False
Normalize start/end dates to midnight before generating date range
weekmask : str, Default 'Mon Tue Wed Thu Fri'
weekmask of valid business days, passed to ``numpy.busdaycalendar``
holidays : list
list/array of dates to exclude from the set of valid business days,
passed to ``numpy.busdaycalendar``
calendar : pd.HolidayCalendar or np.busdaycalendar
calendar : pd.HolidayCalendar or np.
offset : timedelta, default timedelta(0)
"""
_prefix = 'C'
_attributes = frozenset(['n', 'normalize',
Expand Down Expand Up @@ -958,7 +958,6 @@ class _CustomBusinessMonth(_CustomMixin, BusinessMixin, MonthOffset):
Parameters
----------
n : int, default 1
offset : timedelta, default timedelta(0)
normalize : bool, default False
Normalize start/end dates to midnight before generating date range
weekmask : str, Default 'Mon Tue Wed Thu Fri'
Expand All @@ -967,6 +966,7 @@ class _CustomBusinessMonth(_CustomMixin, BusinessMixin, MonthOffset):
list/array of dates to exclude from the set of valid business days,
passed to ``numpy.busdaycalendar``
calendar : pd.HolidayCalendar or np.busdaycalendar
offset : timedelta, default timedelta(0)
"""
_attributes = frozenset(['n', 'normalize',
'weekmask', 'holidays', 'calendar', 'offset'])
Expand Down
8 changes: 4 additions & 4 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,18 +1222,18 @@ def assert_series_equal(left, right, check_dtype=True,
check_less_precise : bool or int, default False
Specify comparison precision. Only used when check_exact is False.
5 digits (False) or 3 digits (True) after decimal points are compared.
If int, then specify the digits to compare
check_exact : bool, default False
Whether to compare number exactly.
If int, then specify the digits to compare.
check_names : bool, default True
Whether to check the Series and Index names attribute.
check_exact : bool, default False
Whether to compare number exactly.
check_datetimelike_compat : bool, default False
Compare datetime-like which is comparable ignoring dtype.
check_categorical : bool, default True
Whether to compare internal Categorical exactly.
obj : str, default 'Series'
Specify object name being compared, internally used to show appropriate
assertion message
assertion message.
"""
__tracebackhide__ = True

Expand Down

0 comments on commit 731d27e

Please sign in to comment.