diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 823687cc20ca0..503120e486f5a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -93,8 +93,8 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS01, SS02, SS03, SS04, SS05, PR03, PR04, PR05, PRO9, PR10, EX04, RT01, RT04, RT05, SA02, SA03)' ; echo $MSG - $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS02,SS03,SS04,SS05,PR03,PR04,PR05,PR09,PR10,EX04,RT01,RT04,RT05,SA02,SA03 + MSG='Validate docstrings (GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS01, SS02, SS03, SS04, SS05, PR03, PR04, PR05, PR08, PRO9, PR10, EX04, RT01, RT04, RT05, SA02, SA03)' ; echo $MSG + $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS02,SS03,SS04,SS05,PR03,PR04,PR05,PR08,PR09,PR10,EX04,RT01,RT04,RT05,SA02,SA03 RET=$(($RET + $?)) ; echo $MSG "DONE" fi diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 6dd3df17139c3..b647e5000b8a9 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5311,10 +5311,9 @@ def sample( If weights do not sum to 1, they will be normalized to sum to 1. Missing values in the weights column will be treated as zero. Infinite values not allowed. - random_state : int, array-like, BitGenerator, np.random.RandomState, - np.random.Generator, optional. If int, array-like, or BitGenerator, seed for - random number generator. If np.random.RandomState or np.random.Generator, - use as given. + random_state : int, array-like, BitGenerator, np.random.RandomState, np.random.Generator, optional + If int, array-like, or BitGenerator, seed for random number generator. + If np.random.RandomState or np.random.Generator, use as given. .. versionchanged:: 1.1.0 @@ -5403,7 +5402,7 @@ def sample( num_legs num_wings num_specimen_seen falcon 2 2 10 fish 0 0 8 - """ + """ # noqa:E501 if axis is None: axis = self._stat_axis_number @@ -7906,11 +7905,10 @@ def resample( level : str or int, optional For a MultiIndex, level (name or number) to use for resampling. `level` must be datetime-like. - origin : {{'epoch', 'start', 'start_day', 'end', 'end_day'}}, Timestamp - or str, default 'start_day' + origin : Timestamp or str, default 'start_day' The timestamp on which to adjust the grouping. The timezone of origin must match the timezone of the index. - If a timestamp is not used, these values are also supported: + If string, must be one of the following: - 'epoch': `origin` is 1970-01-01 - 'start': `origin` is the first value of the timeseries diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index faa32b31a73d7..1e85a650fff24 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -3587,10 +3587,9 @@ def sample( sampling probabilities after normalization within each group. Values must be non-negative with at least one positive element within each group. - random_state : int, array-like, BitGenerator, np.random.RandomState, - np.random.Generator, optional. If int, array-like, or BitGenerator, seed for - random number generator. If np.random.RandomState or np.random.Generator, - use as given. + random_state : int, array-like, BitGenerator, np.random.RandomState, np.random.Generator, optional + If int, array-like, or BitGenerator, seed for random number generator. + If np.random.RandomState or np.random.Generator, use as given. .. versionchanged:: 1.4.0 @@ -3650,7 +3649,7 @@ def sample( 5 black 5 2 blue 2 0 red 0 - """ + """ # noqa:E501 size = sample.process_sampling_size(n, frac, replace) if weights is not None: weights_arr = sample.preprocess_weights( diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index 6cbe37c6b3838..a05f8e581d12f 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -106,11 +106,10 @@ class Grouper: However, loffset is also deprecated for ``.resample(...)`` See: :class:`DataFrame.resample` - origin : {{'epoch', 'start', 'start_day', 'end', 'end_day'}}, Timestamp - or str, default 'start_day' + origin : Timestamp or str, default 'start_day' The timestamp on which to adjust the grouping. The timezone of origin must match the timezone of the index. - If a timestamp is not used, these values are also supported: + If string, must be one of the following: - 'epoch': `origin` is 1970-01-01 - 'start': `origin` is the first value of the timeseries diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index 249fda9173b68..b5f3af5af8e38 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1977,7 +1977,7 @@ def rstrip(self, to_strip=None): Parameters ---------- %(side)s : str - %(side)s to remove. + Remove the %(side)s of the string. Returns -------