From fb76a1766ea059531fad59104a1267141290ce52 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:35:44 -0500 Subject: [PATCH 01/45] PR09 in pandas.DataFrame.idxmax --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 7e3c2200dbabc..0bd5077cfc426 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7925,7 +7925,7 @@ def idxmax(self, axis=0, skipna=True): Parameters ---------- axis : {0 or 'index', 1 or 'columns'}, default 0 - The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise + The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise. skipna : bool, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA. From 0f40afb58fc662215e17eec25febf522239bcd44 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:36:23 -0500 Subject: [PATCH 02/45] PR09 in pandas.DataFrame.idxmin --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 0bd5077cfc426..758b380916790 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7887,7 +7887,7 @@ def idxmin(self, axis=0, skipna=True): Parameters ---------- axis : {0 or 'index', 1 or 'columns'}, default 0 - The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise + The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise. skipna : bool, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA. From 94ac0743c9ca0b6468e70bfee8423cbcc8b1cd9f Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:46:15 -0500 Subject: [PATCH 03/45] PR09 in pandas.DataFrame.sort_values --- pandas/core/frame.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 758b380916790..99f3fcc81de90 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -138,11 +138,12 @@ Name or list of names to sort by. - if `axis` is 0 or `'index'` then `by` may contain index - levels and/or column labels + levels and/or column labels. - if `axis` is 1 or `'columns'` then `by` may contain column - levels and/or index labels + levels and/or index labels. .. versionchanged:: 0.23.0 + Allow specifying index or column level names.""", versionadded_to_excel="", optional_labels="""labels : array-like, optional From e8a5ab1f654897b3a62af1e15dec5e3eacaf751d Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:49:20 -0500 Subject: [PATCH 04/45] PR09 in pandas.DataFrame.to_html --- pandas/core/frame.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 99f3fcc81de90..8152f034c5d79 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2242,9 +2242,10 @@ def to_html( A ``border=border`` attribute is included in the opening `` tag. Default ``pd.options.display.html.border``. encoding : str, default "utf-8" - Set character encoding + Set character encoding. .. versionadded:: 1.0 + table_id : str, optional A css id is included in the opening `
` tag if specified. From 90cc836783a8e45c7067fb547cecdb61f3f26121 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:53:56 -0500 Subject: [PATCH 05/45] PR09 in pandas.arrays.DatetimeArray --- pandas/core/arrays/datetimes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 7cd103d12fa8a..cc2ceb6df1cef 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -253,12 +253,12 @@ class DatetimeArray(dtl.DatetimeLikeArrayMixin, dtl.TimelikeOps, dtl.DatelikeOps The datetime data. For DatetimeArray `values` (or a Series or Index boxing one), - `dtype` and `freq` will be extracted from `values`, with - precedence given to + `dtype` and `freq` will be extracted from `values`. dtype : numpy.dtype or DatetimeTZDtype Note that the only NumPy dtype allowed is 'datetime64[ns]'. freq : str or Offset, optional + The frequency. copy : bool, default False Whether to copy the underlying array of values. From 9e6d2903fdd7731af1cc08287ce3bf1f185a5c8a Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:56:26 -0500 Subject: [PATCH 06/45] PR09 in pandas.Categorical --- pandas/core/arrays/categorical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index 39470c7420086..31e7962172ef0 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -254,7 +254,7 @@ class Categorical(ExtensionArray, PandasObject): `categories` attribute (which in turn is the `categories` argument, if provided). dtype : CategoricalDtype - An instance of ``CategoricalDtype`` to use for this categorical + An instance of ``CategoricalDtype`` to use for this categorical. .. versionadded:: 0.21.0 From 64b7c7534d4986c18ca5223e5b4b780f483aa83b Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:00:41 -0500 Subject: [PATCH 07/45] PR09 in pandas.Grouper --- pandas/core/groupby/grouper.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index 370abe75e1327..e6d23317d1bba 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -36,8 +36,7 @@ class Grouper: """ - A Grouper allows the user to specify a groupby instruction for a target - object. + A Grouper allows the user to specify a groupby instruction for an object. This specification will select a column via the key parameter, or if the level and/or axis parameters are given, a level of the index of the target @@ -49,17 +48,18 @@ class Grouper: Parameters ---------- key : str, defaults to None - groupby key, which selects the grouping column of the target + Groupby key, which selects the grouping column of the target. level : name/number, defaults to None - the level for the target index + The level for the target index. freq : str / frequency object, defaults to None This will groupby the specified frequency if the target selection (via key or level) is a datetime-like object. For full specification of available frequencies, please see `here `_. - axis : number/name of the axis, defaults to 0 + axis : str, int, defaults to 0 + Number/name of the axis. sort : bool, default to False - whether to sort the resulting labels + Whether to sort the resulting labels. closed : {'left' or 'right'} Closed end of interval. Only when `freq` parameter is passed. label : {'left' or 'right'} From d84b2a1baf3276f4117ffa8c76c819b787c77d05 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:06:29 -0500 Subject: [PATCH 08/45] PR09 in pandas.ExcelWriter --- pandas/io/excel/_base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index d0ab6dd37596c..427f04560b3b4 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -540,8 +540,10 @@ def parse( class ExcelWriter(metaclass=abc.ABCMeta): """ - Class for writing DataFrame objects into excel sheets, default is to use - xlwt for xls, openpyxl for xlsx. See DataFrame.to_excel for typical usage. + Class for writing DataFrame objects into excel sheets. + + Default is to use xlwt for xls, openpyxl for xlsx. + See DataFrame.to_excel for typical usage. Parameters ---------- @@ -555,7 +557,7 @@ class ExcelWriter(metaclass=abc.ABCMeta): Format string for dates written into Excel files (e.g. 'YYYY-MM-DD'). datetime_format : str, default None Format string for datetime objects written into Excel files. - (e.g. 'YYYY-MM-DD HH:MM:SS') + (e.g. 'YYYY-MM-DD HH:MM:SS'). mode : {'w', 'a'}, default 'w' File mode to use (write or append). From 214add353ef0a68ff0b2f6d7cfbb2f4022701f38 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:08:21 -0500 Subject: [PATCH 09/45] PR09 in pandas.core.window.ewm.EWM.cov --- pandas/core/window/ewm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/window/ewm.py b/pandas/core/window/ewm.py index 89c25c07b0dbf..2855850734438 100644 --- a/pandas/core/window/ewm.py +++ b/pandas/core/window/ewm.py @@ -315,7 +315,7 @@ def cov(self, other=None, pairwise=None, bias=False, **kwargs): inputs. In the case of missing elements, only complete pairwise observations will be used. bias : bool, default False - Use a standard estimation bias correction + Use a standard estimation bias correction. **kwargs Keyword arguments to be passed into func. """ From 705f44199f3a79aa3de62fafedbd776298ea3a86 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:12:42 -0500 Subject: [PATCH 10/45] PR09 in pandas.core.groupby.GroupBy.rank --- pandas/core/groupby/groupby.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index e73be29d5b104..66095d6f1e597 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -2087,17 +2087,17 @@ def rank( Parameters ---------- method : {'average', 'min', 'max', 'first', 'dense'}, default 'average' - * average: average rank of group - * min: lowest rank in group - * max: highest rank in group - * first: ranks assigned in order they appear in the array - * dense: like 'min', but rank always increases by 1 between groups + * average: average rank of group. + * min: lowest rank in group. + * max: highest rank in group. + * first: ranks assigned in order they appear in the array. + * dense: like 'min', but rank always increases by 1 between groups. ascending : bool, default True False for ranks by high (1) to low (N). na_option : {'keep', 'top', 'bottom'}, default 'keep' - * keep: leave NA values where they are - * top: smallest rank if ascending - * bottom: smallest rank if descending + * keep: leave NA values where they are. + * top: smallest rank if ascending. + * bottom: smallest rank if descending. pct : bool, default False Compute percentage rank of data within each group. axis : int, default 0 From b3f1074f711321c8458090574fdb8c442f0b8239 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:22:55 -0500 Subject: [PATCH 11/45] PR09 in pandas.PeriodIndex --- pandas/core/indexes/period.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index ca7be9ba512da..30c3498ea31df 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -77,8 +77,7 @@ class PeriodDelegateMixin(DatetimelikeDelegateMixin): ) class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): """ - Immutable ndarray holding ordinal values indicating regular periods in - time such as particular years, quarters, months, etc. + Immutable ndarray holding ordinal values indicating regular periods in time. Index keys are boxed to Period objects which carries the metadata (eg, frequency information). @@ -86,11 +85,11 @@ class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): Parameters ---------- data : array-like (1d int np.ndarray or PeriodArray), optional - Optional period-like data to construct index with + Optional period-like data to construct index with. copy : bool - Make a copy of input ndarray + Make a copy of input ndarray. freq : str or period object, optional - One of pandas period strings or corresponding objects + One of pandas period strings or corresponding objects. start : starting value, period-like, optional If data is None, used as the start point in generating regular period data. @@ -99,13 +98,13 @@ class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): periods : int, optional, > 0 Number of periods to generate, if generating index. Takes precedence - over end argument + over end argument. .. deprecated:: 0.24.0 end : end value, period-like, optional If periods is none, generated index will extend to first conforming - period on or just past end argument + period on or just past end argument. .. deprecated:: 0.24.0 @@ -117,7 +116,7 @@ class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): minute : int, array, or Series, default None second : int, array, or Series, default None tz : object, default None - Timezone for converting datetime64 data to Periods + Timezone for converting datetime64 data to Periods. dtype : str or PeriodDtype, default None Attributes From 9d7f405bf9115d536f5ec3304e9b08cd48954e2f Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:32:38 -0500 Subject: [PATCH 12/45] PR09 in pandas.PeriodIndex.asfreq --- pandas/core/arrays/period.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index 78cc54db4b1b8..c6041b14d90ab 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -539,17 +539,20 @@ def asfreq(self, freq=None, how="E"): Parameters ---------- freq : str - a frequency + A frequency. how : str {'E', 'S'} - 'E', 'END', or 'FINISH' for end, - 'S', 'START', or 'BEGIN' for start. Whether the elements should be aligned to the end - or start within pa period. January 31st ('END') vs. - January 1st ('START') for example. + or start within pa period. + + * 'E', 'END', or 'FINISH' for end, + * 'S', 'START', or 'BEGIN' for start. + + January 31st ('END') vs. January 1st ('START') for example. Returns ------- - new : Period Array/Index with the new frequency + Period Array/Index + Constructed with the new frequency. Examples -------- From cb524fdeeb015bfd37a53f2e0aad81d4d306c296 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:35:12 -0500 Subject: [PATCH 13/45] PR09 in pandas.PeriodIndex.to_timestamp --- pandas/core/arrays/period.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index c6041b14d90ab..75a06ac111ed9 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -446,8 +446,9 @@ def to_timestamp(self, freq=None, how="start"): ---------- freq : str or DateOffset, optional Target frequency. The default is 'D' for week or longer, - 'S' otherwise + 'S' otherwise. how : {'s', 'e', 'start', 'end'} + Whether to use the start or end of the time period being converted. Returns ------- From 9a517aad801f19bb8ba2e91fa19d665abe85bec5 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:49:58 -0500 Subject: [PATCH 14/45] whitespace --- pandas/core/arrays/period.py | 2 +- pandas/io/excel/_base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index 75a06ac111ed9..9f759ec5f40f1 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -544,7 +544,7 @@ def asfreq(self, freq=None, how="E"): how : str {'E', 'S'} Whether the elements should be aligned to the end or start within pa period. - + * 'E', 'END', or 'FINISH' for end, * 'S', 'START', or 'BEGIN' for start. diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 427f04560b3b4..462a1fd9aa49d 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -542,7 +542,7 @@ class ExcelWriter(metaclass=abc.ABCMeta): """ Class for writing DataFrame objects into excel sheets. - Default is to use xlwt for xls, openpyxl for xlsx. + Default is to use xlwt for xls, openpyxl for xlsx. See DataFrame.to_excel for typical usage. Parameters From b99d4173e78bccafee7194010965931509e2676f Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 10:11:06 -0500 Subject: [PATCH 15/45] PR09 in pandas.DataFrame.corr --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 8152f034c5d79..374a87206cd7d 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7323,7 +7323,7 @@ def corr(self, method="pearson", min_periods=1): will have 1 along the diagonals and will be symmetric regardless of the callable's behavior. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 min_periods : int, optional Minimum number of observations required per pair of columns From 8095d305b5d7e4fa9e2fc17f8ced8d8d0da63878 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 10:16:23 -0500 Subject: [PATCH 16/45] PR09 in pandas.read_excel --- pandas/io/excel/_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 462a1fd9aa49d..6131e2be478f0 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -82,7 +82,7 @@ * If None, then parse all columns. * If int, then indicates last column to be parsed. - .. deprecated:: 0.24.0 + .. deprecated:: 0.24.0 Pass in a list of int instead from 0 to `usecols` inclusive. * If str, then indicates comma separated list of Excel column letters @@ -91,14 +91,14 @@ * If list of int, then indicates list of column numbers to be parsed. * If list of string, then indicates list of column names to be parsed. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 * If callable, then evaluate each column name against it and parse the column if the callable returns ``True``. Returns a subset of the columns according to behavior above. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 squeeze : bool, default False If the parsed data only contains one column then return a Series. From e8c4c50c24c339af90bf77ade677d3547509e55d Mon Sep 17 00:00:00 2001 From: hughkelley Date: Tue, 12 Nov 2019 10:14:15 -0500 Subject: [PATCH 17/45] Add PR09 to CI checks --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 07c99b39e83e8..9153c5affb944 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -277,7 +277,7 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG + MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05,PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA01,SA02,SA03,SA05 RET=$(($RET + $?)) ; echo $MSG "DONE" From 76daea6d978f873cc514f2c53b28d92943823e41 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 09:41:55 -0500 Subject: [PATCH 18/45] fix spacing --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 6ad39ab8eb5f0..5e1b22489f94d 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -281,7 +281,7 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05,PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG + MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA01,SA02,SA03,SA05 RET=$(($RET + $?)) ; echo $MSG "DONE" From e6094eb6d72c3a82d16237bcec76bf72ed159663 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 09:43:32 -0500 Subject: [PATCH 19/45] fix indentation of deprecation warning --- pandas/io/excel/_base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index b1d242e1831a1..9994ec5815790 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -82,7 +82,7 @@ * If None, then parse all columns. * If int, then indicates last column to be parsed. - .. deprecated:: 0.24.0 + .. deprecated:: 0.24.0 Pass in a list of int instead from 0 to `usecols` inclusive. * If str, then indicates comma separated list of Excel column letters @@ -91,14 +91,14 @@ * If list of int, then indicates list of column numbers to be parsed. * If list of string, then indicates list of column names to be parsed. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 * If callable, then evaluate each column name against it and parse the column if the callable returns ``True``. Returns a subset of the columns according to behavior above. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 squeeze : bool, default False If the parsed data only contains one column then return a Series. @@ -124,7 +124,7 @@ nrows : int, default None Number of rows to parse. - .. versionadded:: 0.23.0 + .. versionadded:: 0.23.0 na_values : scalar, str, list-like, or dict, default None Additional strings to recognize as NA/NaN. If dict passed, specific @@ -191,7 +191,7 @@ skip_footer : int, default 0 Alias of `skipfooter`. - .. deprecated:: 0.23.0 + .. deprecated:: 0.23.0 Use `skipfooter` instead. skipfooter : int, default 0 Rows at the end to skip (0-indexed). From 04bc5a45bf660ca63e24c2d5a416a7258abcfa20 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 16:06:40 -0500 Subject: [PATCH 20/45] indentation in DataFrame.corr --- pandas/core/frame.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index eec5ae33483c0..3560c8cdcd499 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7300,11 +7300,11 @@ def corr(self, method="pearson", min_periods=1): * kendall : Kendall Tau correlation coefficient * spearman : Spearman rank correlation * callable: callable with input two 1d ndarrays - and returning a float. Note that the returned matrix from corr - will have 1 along the diagonals and will be symmetric - regardless of the callable's behavior. + and returning a float. Note that the returned matrix from corr + will have 1 along the diagonals and will be symmetric + regardless of the callable's behavior. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 min_periods : int, optional Minimum number of observations required per pair of columns From 2e427e979c116f1b7e62eb708324c46d9a6b8411 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 16:07:47 -0500 Subject: [PATCH 21/45] indentation in pandas.read_excel --- pandas/io/excel/_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 9994ec5815790..ded68bc788b27 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -124,7 +124,7 @@ nrows : int, default None Number of rows to parse. - .. versionadded:: 0.23.0 + .. versionadded:: 0.23.0 na_values : scalar, str, list-like, or dict, default None Additional strings to recognize as NA/NaN. If dict passed, specific From 735e6c25da98e0aa84fb9fb2c2ba91bed364b212 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 16:12:13 -0500 Subject: [PATCH 22/45] indentation in read_excel --- pandas/io/excel/_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index ded68bc788b27..0c8b09ffa758a 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -191,7 +191,7 @@ skip_footer : int, default 0 Alias of `skipfooter`. - .. deprecated:: 0.23.0 + .. deprecated:: 0.23.0 Use `skipfooter` instead. skipfooter : int, default 0 Rows at the end to skip (0-indexed). From 2f3b8754e868dd9f61d0e0b23860ff13fc98d772 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:35:44 -0500 Subject: [PATCH 23/45] PR09 in pandas.DataFrame.idxmax --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 0b76566adf802..13008f2501b9f 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7908,7 +7908,7 @@ def idxmax(self, axis=0, skipna=True): Parameters ---------- axis : {0 or 'index', 1 or 'columns'}, default 0 - The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise + The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise. skipna : bool, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA. From 405da2ba53f374cb40a2853a8f549ec27e635408 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:36:23 -0500 Subject: [PATCH 24/45] PR09 in pandas.DataFrame.idxmin --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 13008f2501b9f..dfcfd39239168 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7870,7 +7870,7 @@ def idxmin(self, axis=0, skipna=True): Parameters ---------- axis : {0 or 'index', 1 or 'columns'}, default 0 - The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise + The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise. skipna : bool, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA. From 4f718eb8a3af0f4e68352d1edc8015d6cdbba57c Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:46:15 -0500 Subject: [PATCH 25/45] PR09 in pandas.DataFrame.sort_values --- pandas/core/frame.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index dfcfd39239168..f9216cc021776 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -137,11 +137,12 @@ Name or list of names to sort by. - if `axis` is 0 or `'index'` then `by` may contain index - levels and/or column labels + levels and/or column labels. - if `axis` is 1 or `'columns'` then `by` may contain column - levels and/or index labels + levels and/or index labels. .. versionchanged:: 0.23.0 + Allow specifying index or column level names.""", versionadded_to_excel="", optional_labels="""labels : array-like, optional From 84ab4daf487191d60b128fa4a92b0201e6520961 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:49:20 -0500 Subject: [PATCH 26/45] PR09 in pandas.DataFrame.to_html --- pandas/core/frame.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index f9216cc021776..90c0b0cb5f9c6 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2241,9 +2241,10 @@ def to_html( A ``border=border`` attribute is included in the opening `
` tag. Default ``pd.options.display.html.border``. encoding : str, default "utf-8" - Set character encoding + Set character encoding. .. versionadded:: 1.0 + table_id : str, optional A css id is included in the opening `
` tag if specified. From 60d9a1f9eda4299a37f18a6dd9d32d812c5b02f9 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:53:56 -0500 Subject: [PATCH 27/45] PR09 in pandas.arrays.DatetimeArray --- pandas/core/arrays/datetimes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 8e3c727a14c99..277040a36242d 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -246,12 +246,12 @@ class DatetimeArray(dtl.DatetimeLikeArrayMixin, dtl.TimelikeOps, dtl.DatelikeOps The datetime data. For DatetimeArray `values` (or a Series or Index boxing one), - `dtype` and `freq` will be extracted from `values`, with - precedence given to + `dtype` and `freq` will be extracted from `values`. dtype : numpy.dtype or DatetimeTZDtype Note that the only NumPy dtype allowed is 'datetime64[ns]'. freq : str or Offset, optional + The frequency. copy : bool, default False Whether to copy the underlying array of values. From 7d1bcddb0aad5f392b74716a9369d5df7013bb8a Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 08:56:26 -0500 Subject: [PATCH 28/45] PR09 in pandas.Categorical --- pandas/core/arrays/categorical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index c6e2a7b7a6e00..3ed3be22c0be0 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -253,7 +253,7 @@ class Categorical(ExtensionArray, PandasObject): `categories` attribute (which in turn is the `categories` argument, if provided). dtype : CategoricalDtype - An instance of ``CategoricalDtype`` to use for this categorical + An instance of ``CategoricalDtype`` to use for this categorical. .. versionadded:: 0.21.0 From 9585d6ed4d6a16b38600e92f95570be51d530315 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:00:41 -0500 Subject: [PATCH 29/45] PR09 in pandas.Grouper --- pandas/core/groupby/grouper.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index c37617b1f1f7f..df63871437917 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -36,8 +36,7 @@ class Grouper: """ - A Grouper allows the user to specify a groupby instruction for a target - object. + A Grouper allows the user to specify a groupby instruction for an object. This specification will select a column via the key parameter, or if the level and/or axis parameters are given, a level of the index of the target @@ -49,17 +48,18 @@ class Grouper: Parameters ---------- key : str, defaults to None - groupby key, which selects the grouping column of the target + Groupby key, which selects the grouping column of the target. level : name/number, defaults to None - the level for the target index + The level for the target index. freq : str / frequency object, defaults to None This will groupby the specified frequency if the target selection (via key or level) is a datetime-like object. For full specification of available frequencies, please see `here `_. - axis : number/name of the axis, defaults to 0 + axis : str, int, defaults to 0 + Number/name of the axis. sort : bool, default to False - whether to sort the resulting labels + Whether to sort the resulting labels. closed : {'left' or 'right'} Closed end of interval. Only when `freq` parameter is passed. label : {'left' or 'right'} From 9d5ed04104ee4fc1a836fbd8179df32b7021a2e2 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:06:29 -0500 Subject: [PATCH 30/45] PR09 in pandas.ExcelWriter --- pandas/io/excel/_base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 7ad7c40917b9c..2ff7c7e289750 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -540,8 +540,10 @@ def parse( class ExcelWriter(metaclass=abc.ABCMeta): """ - Class for writing DataFrame objects into excel sheets, default is to use - xlwt for xls, openpyxl for xlsx. See DataFrame.to_excel for typical usage. + Class for writing DataFrame objects into excel sheets. + + Default is to use xlwt for xls, openpyxl for xlsx. + See DataFrame.to_excel for typical usage. Parameters ---------- @@ -555,7 +557,7 @@ class ExcelWriter(metaclass=abc.ABCMeta): Format string for dates written into Excel files (e.g. 'YYYY-MM-DD'). datetime_format : str, default None Format string for datetime objects written into Excel files. - (e.g. 'YYYY-MM-DD HH:MM:SS') + (e.g. 'YYYY-MM-DD HH:MM:SS'). mode : {'w', 'a'}, default 'w' File mode to use (write or append). From a049e8d6173d673f3e6b666dab5807e64c1c1d7c Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:08:21 -0500 Subject: [PATCH 31/45] PR09 in pandas.core.window.ewm.EWM.cov --- pandas/core/window/ewm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/window/ewm.py b/pandas/core/window/ewm.py index 89c25c07b0dbf..2855850734438 100644 --- a/pandas/core/window/ewm.py +++ b/pandas/core/window/ewm.py @@ -315,7 +315,7 @@ def cov(self, other=None, pairwise=None, bias=False, **kwargs): inputs. In the case of missing elements, only complete pairwise observations will be used. bias : bool, default False - Use a standard estimation bias correction + Use a standard estimation bias correction. **kwargs Keyword arguments to be passed into func. """ From af1d4d9f83e9693b128995dfb05c154df02108a8 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:12:42 -0500 Subject: [PATCH 32/45] PR09 in pandas.core.groupby.GroupBy.rank --- pandas/core/groupby/groupby.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 236df4b3854a4..6e38922fc138b 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -2060,17 +2060,17 @@ def rank( Parameters ---------- method : {'average', 'min', 'max', 'first', 'dense'}, default 'average' - * average: average rank of group - * min: lowest rank in group - * max: highest rank in group - * first: ranks assigned in order they appear in the array - * dense: like 'min', but rank always increases by 1 between groups + * average: average rank of group. + * min: lowest rank in group. + * max: highest rank in group. + * first: ranks assigned in order they appear in the array. + * dense: like 'min', but rank always increases by 1 between groups. ascending : bool, default True False for ranks by high (1) to low (N). na_option : {'keep', 'top', 'bottom'}, default 'keep' - * keep: leave NA values where they are - * top: smallest rank if ascending - * bottom: smallest rank if descending + * keep: leave NA values where they are. + * top: smallest rank if ascending. + * bottom: smallest rank if descending. pct : bool, default False Compute percentage rank of data within each group. axis : int, default 0 From abe0eb80acc8286d8b93490be13f41123144f53f Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:22:55 -0500 Subject: [PATCH 33/45] PR09 in pandas.PeriodIndex --- pandas/core/indexes/period.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index cae1380e930f1..522c7d27371fc 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -77,8 +77,7 @@ class PeriodDelegateMixin(DatetimelikeDelegateMixin): ) class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): """ - Immutable ndarray holding ordinal values indicating regular periods in - time such as particular years, quarters, months, etc. + Immutable ndarray holding ordinal values indicating regular periods in time. Index keys are boxed to Period objects which carries the metadata (eg, frequency information). @@ -86,11 +85,11 @@ class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): Parameters ---------- data : array-like (1d int np.ndarray or PeriodArray), optional - Optional period-like data to construct index with + Optional period-like data to construct index with. copy : bool - Make a copy of input ndarray + Make a copy of input ndarray. freq : str or period object, optional - One of pandas period strings or corresponding objects + One of pandas period strings or corresponding objects. start : starting value, period-like, optional If data is None, used as the start point in generating regular period data. @@ -99,13 +98,13 @@ class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): periods : int, optional, > 0 Number of periods to generate, if generating index. Takes precedence - over end argument + over end argument. .. deprecated:: 0.24.0 end : end value, period-like, optional If periods is none, generated index will extend to first conforming - period on or just past end argument + period on or just past end argument. .. deprecated:: 0.24.0 @@ -117,7 +116,7 @@ class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): minute : int, array, or Series, default None second : int, array, or Series, default None tz : object, default None - Timezone for converting datetime64 data to Periods + Timezone for converting datetime64 data to Periods. dtype : str or PeriodDtype, default None Attributes From 44755f1b79ce2e8350ca9f7b987fa6be9939d426 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:32:38 -0500 Subject: [PATCH 34/45] PR09 in pandas.PeriodIndex.asfreq --- pandas/core/arrays/period.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index f3d51b28ad399..5674a145710f2 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -535,17 +535,20 @@ def asfreq(self, freq=None, how="E"): Parameters ---------- freq : str - a frequency + A frequency. how : str {'E', 'S'} - 'E', 'END', or 'FINISH' for end, - 'S', 'START', or 'BEGIN' for start. Whether the elements should be aligned to the end - or start within pa period. January 31st ('END') vs. - January 1st ('START') for example. + or start within pa period. + + * 'E', 'END', or 'FINISH' for end, + * 'S', 'START', or 'BEGIN' for start. + + January 31st ('END') vs. January 1st ('START') for example. Returns ------- - new : Period Array/Index with the new frequency + Period Array/Index + Constructed with the new frequency. Examples -------- From 796828fac47e8b99e937a9336bc14434f4e7e696 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:35:12 -0500 Subject: [PATCH 35/45] PR09 in pandas.PeriodIndex.to_timestamp --- pandas/core/arrays/period.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index 5674a145710f2..77f768b9858dd 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -442,8 +442,9 @@ def to_timestamp(self, freq=None, how="start"): ---------- freq : str or DateOffset, optional Target frequency. The default is 'D' for week or longer, - 'S' otherwise + 'S' otherwise. how : {'s', 'e', 'start', 'end'} + Whether to use the start or end of the time period being converted. Returns ------- From 6e703aaaabf8355dc16e735b4d9f6ccb50ed964c Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 09:49:58 -0500 Subject: [PATCH 36/45] whitespace --- pandas/core/arrays/period.py | 2 +- pandas/io/excel/_base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index 77f768b9858dd..c1646546bfa3c 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -540,7 +540,7 @@ def asfreq(self, freq=None, how="E"): how : str {'E', 'S'} Whether the elements should be aligned to the end or start within pa period. - + * 'E', 'END', or 'FINISH' for end, * 'S', 'START', or 'BEGIN' for start. diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 2ff7c7e289750..0c8b09ffa758a 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -542,7 +542,7 @@ class ExcelWriter(metaclass=abc.ABCMeta): """ Class for writing DataFrame objects into excel sheets. - Default is to use xlwt for xls, openpyxl for xlsx. + Default is to use xlwt for xls, openpyxl for xlsx. See DataFrame.to_excel for typical usage. Parameters From 4525b081b9222a45118b03ba8cff6b6f3b6adaa2 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 10:11:06 -0500 Subject: [PATCH 37/45] PR09 in pandas.DataFrame.corr --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 90c0b0cb5f9c6..5812c02f8d22a 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7306,7 +7306,7 @@ def corr(self, method="pearson", min_periods=1): will have 1 along the diagonals and will be symmetric regardless of the callable's behavior. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 min_periods : int, optional Minimum number of observations required per pair of columns From 1fd931a817dc54926dc5635a139cbab574ae0aaf Mon Sep 17 00:00:00 2001 From: hughkelley Date: Sun, 10 Nov 2019 10:16:23 -0500 Subject: [PATCH 38/45] PR09 in pandas.read_excel --- pandas/io/excel/_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 0c8b09ffa758a..b1d242e1831a1 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -82,7 +82,7 @@ * If None, then parse all columns. * If int, then indicates last column to be parsed. - .. deprecated:: 0.24.0 + .. deprecated:: 0.24.0 Pass in a list of int instead from 0 to `usecols` inclusive. * If str, then indicates comma separated list of Excel column letters @@ -91,14 +91,14 @@ * If list of int, then indicates list of column numbers to be parsed. * If list of string, then indicates list of column names to be parsed. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 * If callable, then evaluate each column name against it and parse the column if the callable returns ``True``. Returns a subset of the columns according to behavior above. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 squeeze : bool, default False If the parsed data only contains one column then return a Series. From a5eb1a92fefcb29d91dcf81b7e74586641531f76 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Tue, 12 Nov 2019 10:14:15 -0500 Subject: [PATCH 39/45] Add PR09 to CI checks --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index edd8fcd418c47..96c2461d99ec5 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -281,7 +281,7 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG + MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05,PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA01,SA02,SA03,SA05 RET=$(($RET + $?)) ; echo $MSG "DONE" From 3ff70b4c9b5dca8fd68a926fc7ca1db5ae6cd5c6 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 09:41:55 -0500 Subject: [PATCH 40/45] fix spacing --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 96c2461d99ec5..9185d10e66da8 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -281,7 +281,7 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05,PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG + MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA01,SA02,SA03,SA05 RET=$(($RET + $?)) ; echo $MSG "DONE" From 080a77b3f6ecf0aec1a9578cb48018d29787562f Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 09:43:32 -0500 Subject: [PATCH 41/45] fix indentation of deprecation warning --- pandas/io/excel/_base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index b1d242e1831a1..9994ec5815790 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -82,7 +82,7 @@ * If None, then parse all columns. * If int, then indicates last column to be parsed. - .. deprecated:: 0.24.0 + .. deprecated:: 0.24.0 Pass in a list of int instead from 0 to `usecols` inclusive. * If str, then indicates comma separated list of Excel column letters @@ -91,14 +91,14 @@ * If list of int, then indicates list of column numbers to be parsed. * If list of string, then indicates list of column names to be parsed. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 * If callable, then evaluate each column name against it and parse the column if the callable returns ``True``. Returns a subset of the columns according to behavior above. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 squeeze : bool, default False If the parsed data only contains one column then return a Series. @@ -124,7 +124,7 @@ nrows : int, default None Number of rows to parse. - .. versionadded:: 0.23.0 + .. versionadded:: 0.23.0 na_values : scalar, str, list-like, or dict, default None Additional strings to recognize as NA/NaN. If dict passed, specific @@ -191,7 +191,7 @@ skip_footer : int, default 0 Alias of `skipfooter`. - .. deprecated:: 0.23.0 + .. deprecated:: 0.23.0 Use `skipfooter` instead. skipfooter : int, default 0 Rows at the end to skip (0-indexed). From de22262746e6bd6cbd7a0e202c62474386e39d3b Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 16:06:40 -0500 Subject: [PATCH 42/45] indentation in DataFrame.corr --- pandas/core/frame.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 5812c02f8d22a..02a18df1a2f11 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7302,11 +7302,11 @@ def corr(self, method="pearson", min_periods=1): * kendall : Kendall Tau correlation coefficient * spearman : Spearman rank correlation * callable: callable with input two 1d ndarrays - and returning a float. Note that the returned matrix from corr - will have 1 along the diagonals and will be symmetric - regardless of the callable's behavior. + and returning a float. Note that the returned matrix from corr + will have 1 along the diagonals and will be symmetric + regardless of the callable's behavior. - .. versionadded:: 0.24.0 + .. versionadded:: 0.24.0 min_periods : int, optional Minimum number of observations required per pair of columns From c56b0f95885ce2b164e8ba17ff28b7708be6bd4a Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 16:07:47 -0500 Subject: [PATCH 43/45] indentation in pandas.read_excel --- pandas/io/excel/_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 9994ec5815790..ded68bc788b27 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -124,7 +124,7 @@ nrows : int, default None Number of rows to parse. - .. versionadded:: 0.23.0 + .. versionadded:: 0.23.0 na_values : scalar, str, list-like, or dict, default None Additional strings to recognize as NA/NaN. If dict passed, specific From 18f492e8e6ded9b3e68c0e37a278936bcf2e73af Mon Sep 17 00:00:00 2001 From: hughkelley Date: Fri, 15 Nov 2019 16:12:13 -0500 Subject: [PATCH 44/45] indentation in read_excel --- pandas/io/excel/_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index ded68bc788b27..0c8b09ffa758a 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -191,7 +191,7 @@ skip_footer : int, default 0 Alias of `skipfooter`. - .. deprecated:: 0.23.0 + .. deprecated:: 0.23.0 Use `skipfooter` instead. skipfooter : int, default 0 Rows at the end to skip (0-indexed). From d434831a8877721d64c06a710e2817d2e9a9a4b0 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Wed, 11 Dec 2019 13:23:08 -0500 Subject: [PATCH 45/45] PR09 errors --- pandas/core/computation/eval.py | 1 + pandas/core/frame.py | 3 +-- pandas/core/generic.py | 4 ++-- pandas/core/indexes/period.py | 2 +- pandas/io/formats/style.py | 6 +++--- pandas/io/sql.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pandas/core/computation/eval.py b/pandas/core/computation/eval.py index 6dc110e3f8d07..9653267f8541f 100644 --- a/pandas/core/computation/eval.py +++ b/pandas/core/computation/eval.py @@ -219,6 +219,7 @@ def eval( truediv : bool, optional Whether to use true division, like in Python >= 3. + deprecated:: 1.0.0 local_dict : dict or None, optional diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 85c3ec8ef02d4..fb28e2b89c698 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -7142,8 +7142,7 @@ def corr(self, method="pearson", min_periods=1): Parameters ---------- method : {'pearson', 'kendall', 'spearman'} or callable - Method of correlation: - + Method of correlation. * pearson : standard correlation coefficient * kendall : Kendall Tau correlation coefficient * spearman : Spearman rank correlation diff --git a/pandas/core/generic.py b/pandas/core/generic.py index f88f37fac7157..86ab5aab352b2 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2429,7 +2429,7 @@ def to_hdf( which may perform worse but allow more flexible operations like searching / selecting subsets of the data. - If None, pd.get_option('io.hdf.default_format') is checked, - followed by fallback to "fixed" + followed by fallback to "fixed". errors : str, default 'strict' Specifies how encoding and decoding errors are to be handled. See the errors argument for :func:`open` for a full list @@ -2573,7 +2573,7 @@ def to_sql( library. Legacy support is provided for sqlite3.Connection objects. The user is responsible for engine disposal and connection closure for the SQLAlchemy connectable See `here \ - `_ + `_. schema : str, optional Specify the schema (if database flavor supports this). If None, use diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index d2caf22faeb0d..d73afd7f3b6e9 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -89,7 +89,7 @@ class PeriodIndex(DatetimeIndexOpsMixin, Int64Index, PeriodDelegateMixin): copy : bool Make a copy of input ndarray. freq : str or period object, optional - One of pandas period strings or corresponding objects + One of pandas period strings or corresponding objects. year : int, array, or Series, default None month : int, array, or Series, default None quarter : int, array, or Series, default None diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index a45045991e879..4262892ba32cf 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -73,7 +73,7 @@ class Styler: number and ```` is the column number. na_rep : str, optional Representation for missing values. - If ``na_rep`` is None, no special formatting is applied + If ``na_rep`` is None, no special formatting is applied. .. versionadded:: 1.0.0 @@ -434,13 +434,13 @@ def format(self, formatter, subset=None, na_rep: Optional[str] = None): Parameters ---------- formatter : str, callable, dict or None - If ``formatter`` is None, the default formatter is used + If ``formatter`` is None, the default formatter is used. subset : IndexSlice An argument to ``DataFrame.loc`` that restricts which elements ``formatter`` is applied to. na_rep : str, optional Representation for missing values. - If ``na_rep`` is None, no special formatting is applied + If ``na_rep`` is None, no special formatting is applied. .. versionadded:: 1.0.0 diff --git a/pandas/io/sql.py b/pandas/io/sql.py index b619ea93b981d..5f87042c7094e 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -363,7 +363,7 @@ def read_sql( Using SQLAlchemy makes it possible to use any DB supported by that library. If a DBAPI2 object, only sqlite3 is supported. The user is responsible for engine disposal and connection closure for the SQLAlchemy connectable. See - `here `_ + `here `_. index_col : str or list of strings, optional, default: None Column(s) to set as index(MultiIndex). coerce_float : bool, default True