From 681d9191d09843ffa248fe27dfb677e9683e3f82 Mon Sep 17 00:00:00 2001 From: thoo Date: Fri, 9 Nov 2018 23:42:45 -0500 Subject: [PATCH] Fix order of parameters --- pandas/core/frame.py | 11 +++++------ pandas/core/generic.py | 2 +- pandas/core/reshape/pivot.py | 4 ++-- pandas/io/json/normalize.py | 2 +- pandas/tseries/offsets.py | 4 ++-- pandas/util/testing.py | 2 +- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index eff75938b11816..c526411df005f3 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2036,9 +2036,8 @@ def to_parquet(self, fname, engine='auto', compression='snappy', 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, - sparsify=None, index_names=True, justify=None, - line_width=None, max_rows=None, max_cols=None, - show_dimensions=False): + sparsify=None, index_names=True, justify=None, max_rows=None, + max_cols=None, show_dimensions=False, line_width=None): """ Render a DataFrame to a console-friendly tabular output. @@ -2085,9 +2084,9 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True, 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, - sparsify=None, index_names=True, justify=None, bold_rows=True, - classes=None, escape=True, max_rows=None, max_cols=None, - show_dimensions=False, notebook=False, decimal='.', + sparsify=None, index_names=True, justify=None, max_rows=None, + max_cols=None, show_dimensions=False, bold_rows=True, + classes=None, escape=True, notebook=False, decimal='.', border=None, table_id=None): """ Render a DataFrame as an HTML table. diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 53cdc46fdd16b6..7ac02afbc38a1e 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -9651,7 +9651,7 @@ def _add_series_or_dataframe_operations(cls): @Appender(rwindow.rolling.__doc__) def rolling(self, window, min_periods=None, center=False, - win_type=None, on=None, axis=0, closed=None): + win_type=None, on=None, closed=None, axis=0): axis = self._get_axis_number(axis) return rwindow.rolling(self, window=window, min_periods=min_periods, diff --git a/pandas/core/reshape/pivot.py b/pandas/core/reshape/pivot.py index ec4cdffc56435d..66eabb7ade4c2c 100644 --- a/pandas/core/reshape/pivot.py +++ b/pandas/core/reshape/pivot.py @@ -390,8 +390,8 @@ def pivot(data, index=None, columns=None, values=None): return indexed.unstack(columns) -def crosstab(index, columns, values=None, rownames=None, colnames=None, - aggfunc=None, margins=False, margins_name='All', dropna=True, +def crosstab(index, columns, values=None, aggfunc=None, rownames=None, + colnames=None, margins=False, margins_name='All', dropna=True, normalize=False): """ Compute a simple cross-tabulation of two (or more) factors. By default diff --git a/pandas/io/json/normalize.py b/pandas/io/json/normalize.py index ce07a795017e54..32a879dbeb4a9c 100644 --- a/pandas/io/json/normalize.py +++ b/pandas/io/json/normalize.py @@ -94,8 +94,8 @@ def nested_to_record(ds, prefix="", sep=".", level=0): def json_normalize(data, record_path=None, meta=None, - meta_prefix=None, record_prefix=None, + meta_prefix=None, errors='raise', sep='.'): """ diff --git a/pandas/tseries/offsets.py b/pandas/tseries/offsets.py index 6fb562e301ac2e..53719b71d11803 100644 --- a/pandas/tseries/offsets.py +++ b/pandas/tseries/offsets.py @@ -807,7 +807,6 @@ 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' @@ -816,6 +815,7 @@ class CustomBusinessDay(_CustomMixin, BusinessDay): 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) """ _prefix = 'C' _attributes = frozenset(['n', 'normalize', @@ -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' @@ -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']) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index 09c5a68ec28c29..2e26d48382df6e 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -1201,8 +1201,8 @@ def assert_series_equal(left, right, check_dtype=True, check_index_type='equiv', check_series_type=True, check_less_precise=False, - check_names=True, check_exact=False, + check_names=True, check_datetimelike_compat=False, check_categorical=True, obj='Series'):