Skip to content

Commit 1f0f71b

Browse files
mwossPingviinituutti
authored andcommitted
PR04 errors fix (pandas-dev#25157)
1 parent b4da20d commit 1f0f71b

File tree

10 files changed

+34
-24
lines changed

10 files changed

+34
-24
lines changed

ci/code_checks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ fi
242242
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
243243

244244
MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, PR10, EX04, RT04, SS05, SA05)' ; echo $MSG
245-
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04,RT04,SS05,SA05
245+
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR04,PR05,EX04,RT04,SS05,SA05
246246
RET=$(($RET + $?)) ; echo $MSG "DONE"
247247

248248
fi

pandas/_libs/tslibs/timedeltas.pyx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1127,10 +1127,11 @@ class Timedelta(_Timedelta):
11271127
'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'L',
11281128
'us', 'microseconds', 'microsecond', 'micro', 'micros', 'U',
11291129
'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'N'}
1130-
days, seconds, microseconds,
1131-
milliseconds, minutes, hours, weeks : numeric, optional
1130+
**kwargs
1131+
Available kwargs: {days, seconds, microseconds,
1132+
milliseconds, minutes, hours, weeks}.
11321133
Values for construction in compat with datetime.timedelta.
1133-
np ints and floats will be coerced to python ints and floats.
1134+
Numpy ints and floats will be coerced to python ints and floats.
11341135
11351136
Notes
11361137
-----

pandas/core/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def _factorize_array(values, na_sentinel=-1, size_hint=None,
563563
coerced to ndarrays before factorization.
564564
"""),
565565
order=dedent("""\
566-
order
566+
order : None
567567
.. deprecated:: 0.23.0
568568
569569
This parameter has no effect and is deprecated.

pandas/core/generic.py

+2
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ def transpose(self, *args, **kwargs):
648648
copy : boolean, default False
649649
Make a copy of the underlying data. Mixed-dtype data will
650650
always result in a copy
651+
**kwargs
652+
Additional keyword arguments will be passed to the function.
651653
652654
Returns
653655
-------

pandas/core/groupby/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,7 @@ def rank(self, method='average', ascending=True, na_option='keep',
18351835
The axis of the object over which to compute the rank.
18361836
18371837
Returns
1838-
-----
1838+
-------
18391839
DataFrame with ranking of values within each group
18401840
"""
18411841
if na_option not in {'keep', 'top', 'bottom'}:

pandas/core/groupby/grouper.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,17 @@ class Grouper(object):
5454
axis : number/name of the axis, defaults to 0
5555
sort : boolean, default to False
5656
whether to sort the resulting labels
57-
58-
additional kwargs to control time-like groupers (when `freq` is passed)
59-
60-
closed : closed end of interval; 'left' or 'right'
61-
label : interval boundary to use for labeling; 'left' or 'right'
57+
closed : {'left' or 'right'}
58+
Closed end of interval. Only when `freq` parameter is passed.
59+
label : {'left' or 'right'}
60+
Interval boundary to use for labeling.
61+
Only when `freq` parameter is passed.
6262
convention : {'start', 'end', 'e', 's'}
63-
If grouper is PeriodIndex
64-
base, loffset
63+
If grouper is PeriodIndex and `freq` parameter is passed.
64+
base : int, default 0
65+
Only when `freq` parameter is passed.
66+
loffset : string, DateOffset, timedelta object
67+
Only when `freq` parameter is passed.
6568
6669
Returns
6770
-------

pandas/core/panel.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
axes_single_arg="{0, 1, 2, 'items', 'major_axis', 'minor_axis'}",
4444
optional_mapper='', optional_axis='', optional_labels='')
4545
_shared_doc_kwargs['args_transpose'] = (
46-
"three positional arguments: each one of\n{ax_single}".format(
46+
"{ax_single}\n\tThree positional arguments from given options.".format(
4747
ax_single=_shared_doc_kwargs['axes_single_arg']))
4848

4949

@@ -1009,7 +1009,8 @@ def apply(self, func, axis='major', **kwargs):
10091009
DataFrames of items & major axis will be passed
10101010
axis : {'items', 'minor', 'major'}, or {0, 1, 2}, or a tuple with two
10111011
axes
1012-
Additional keyword arguments will be passed as keywords to the function
1012+
**kwargs
1013+
Additional keyword arguments will be passed to the function.
10131014
10141015
Returns
10151016
-------

pandas/core/resample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ def std(self, ddof=1, *args, **kwargs):
795795
Parameters
796796
----------
797797
ddof : integer, default 1
798-
degrees of freedom
798+
Degrees of freedom.
799799
"""
800800
nv.validate_resampler_func('std', args, kwargs)
801801
return self._downsample('std', ddof=ddof)

pandas/io/formats/style.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,11 @@ def render(self, **kwargs):
424424
425425
Parameters
426426
----------
427-
`**kwargs` : Any additional keyword arguments are passed through
428-
to ``self.template.render``. This is useful when you need to provide
429-
additional variables for a custom template.
427+
**kwargs
428+
Any additional keyword arguments are passed
429+
through to ``self.template.render``.
430+
This is useful when you need to provide
431+
additional variables for a custom template.
430432
431433
.. versionadded:: 0.20
432434

pandas/io/parquet.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,17 @@ def read_parquet(path, engine='auto', columns=None, **kwargs):
262262
----------
263263
path : string
264264
File path
265-
columns : list, default=None
266-
If not None, only these columns will be read from the file.
267-
268-
.. versionadded 0.21.1
269265
engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
270266
Parquet library to use. If 'auto', then the option
271267
``io.parquet.engine`` is used. The default ``io.parquet.engine``
272268
behavior is to try 'pyarrow', falling back to 'fastparquet' if
273269
'pyarrow' is unavailable.
274-
kwargs are passed to the engine
270+
columns : list, default=None
271+
If not None, only these columns will be read from the file.
272+
273+
.. versionadded 0.21.1
274+
**kwargs
275+
Any additional kwargs are passed to the engine.
275276
276277
Returns
277278
-------

0 commit comments

Comments
 (0)