diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 5c9d20e483ce4..eacab199cc0be 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -242,7 +242,7 @@ fi if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, PR10, EX04, RT04, SS05, SA05)' ; echo $MSG - $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04,RT04,SS05,SA05 + $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR04,PR05,EX04,RT04,SS05,SA05 RET=$(($RET + $?)) ; echo $MSG "DONE" fi diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx index 0a19d8749fc7c..b6cb1d3012cee 100644 --- a/pandas/_libs/tslibs/timedeltas.pyx +++ b/pandas/_libs/tslibs/timedeltas.pyx @@ -1127,10 +1127,11 @@ class Timedelta(_Timedelta): 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'L', 'us', 'microseconds', 'microsecond', 'micro', 'micros', 'U', 'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'N'} - days, seconds, microseconds, - milliseconds, minutes, hours, weeks : numeric, optional + **kwargs + Available kwargs: {days, seconds, microseconds, + milliseconds, minutes, hours, weeks}. Values for construction in compat with datetime.timedelta. - np ints and floats will be coerced to python ints and floats. + Numpy ints and floats will be coerced to python ints and floats. Notes ----- diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index a70a3ff06f202..77681f6ac3f93 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -563,7 +563,7 @@ def _factorize_array(values, na_sentinel=-1, size_hint=None, coerced to ndarrays before factorization. """), order=dedent("""\ - order + order : None .. deprecated:: 0.23.0 This parameter has no effect and is deprecated. diff --git a/pandas/core/generic.py b/pandas/core/generic.py index bb5c0e49e4dd1..cf371efee02e7 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -648,6 +648,8 @@ def transpose(self, *args, **kwargs): copy : boolean, default False Make a copy of the underlying data. Mixed-dtype data will always result in a copy + **kwargs + Additional keyword arguments will be passed to the function. Returns ------- diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index c8f1a75b2eff5..fd6e1fae9146c 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -1835,7 +1835,7 @@ def rank(self, method='average', ascending=True, na_option='keep', The axis of the object over which to compute the rank. Returns - ----- + ------- DataFrame with ranking of values within each group """ if na_option not in {'keep', 'top', 'bottom'}: diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index b0d7cf9d431cc..fc32a281b99de 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -54,14 +54,17 @@ class Grouper(object): axis : number/name of the axis, defaults to 0 sort : boolean, default to False whether to sort the resulting labels - - additional kwargs to control time-like groupers (when `freq` is passed) - - closed : closed end of interval; 'left' or 'right' - label : interval boundary to use for labeling; 'left' or 'right' + closed : {'left' or 'right'} + Closed end of interval. Only when `freq` parameter is passed. + label : {'left' or 'right'} + Interval boundary to use for labeling. + Only when `freq` parameter is passed. convention : {'start', 'end', 'e', 's'} - If grouper is PeriodIndex - base, loffset + If grouper is PeriodIndex and `freq` parameter is passed. + base : int, default 0 + Only when `freq` parameter is passed. + loffset : string, DateOffset, timedelta object + Only when `freq` parameter is passed. Returns ------- diff --git a/pandas/core/panel.py b/pandas/core/panel.py index 16bcc17a6b4ea..dda5533f1ea7b 100644 --- a/pandas/core/panel.py +++ b/pandas/core/panel.py @@ -43,7 +43,7 @@ axes_single_arg="{0, 1, 2, 'items', 'major_axis', 'minor_axis'}", optional_mapper='', optional_axis='', optional_labels='') _shared_doc_kwargs['args_transpose'] = ( - "three positional arguments: each one of\n{ax_single}".format( + "{ax_single}\n\tThree positional arguments from given options.".format( ax_single=_shared_doc_kwargs['axes_single_arg'])) @@ -1009,7 +1009,8 @@ def apply(self, func, axis='major', **kwargs): DataFrames of items & major axis will be passed axis : {'items', 'minor', 'major'}, or {0, 1, 2}, or a tuple with two axes - Additional keyword arguments will be passed as keywords to the function + **kwargs + Additional keyword arguments will be passed to the function. Returns ------- diff --git a/pandas/core/resample.py b/pandas/core/resample.py index e26176cffc66d..235c45d676e45 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -795,7 +795,7 @@ def std(self, ddof=1, *args, **kwargs): Parameters ---------- ddof : integer, default 1 - degrees of freedom + Degrees of freedom. """ nv.validate_resampler_func('std', args, kwargs) return self._downsample('std', ddof=ddof) diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index d241528d9779b..cd6e3505d71db 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -424,9 +424,11 @@ def render(self, **kwargs): Parameters ---------- - `**kwargs` : Any additional keyword arguments are passed through - to ``self.template.render``. This is useful when you need to provide - additional variables for a custom template. + **kwargs + Any additional keyword arguments are passed + through to ``self.template.render``. + This is useful when you need to provide + additional variables for a custom template. .. versionadded:: 0.20 diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py index dada9000d901a..ba322f42c07c1 100644 --- a/pandas/io/parquet.py +++ b/pandas/io/parquet.py @@ -262,16 +262,17 @@ def read_parquet(path, engine='auto', columns=None, **kwargs): ---------- path : string File path - columns : list, default=None - If not None, only these columns will be read from the file. - - .. versionadded 0.21.1 engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto' Parquet library to use. If 'auto', then the option ``io.parquet.engine`` is used. The default ``io.parquet.engine`` behavior is to try 'pyarrow', falling back to 'fastparquet' if 'pyarrow' is unavailable. - kwargs are passed to the engine + columns : list, default=None + If not None, only these columns will be read from the file. + + .. versionadded 0.21.1 + **kwargs + Any additional kwargs are passed to the engine. Returns -------