From 45a2d8821838d2d3dec7834407e9f6c8b92f13e6 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Wed, 6 Nov 2019 11:08:24 -0500 Subject: [PATCH 1/6] PR09 and PR08 in IntervalIndex from_breaks and from_tuples --- pandas/core/arrays/interval.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py index 4039cc91fb554..869019cd3d222 100644 --- a/pandas/core/arrays/interval.py +++ b/pandas/core/arrays/interval.py @@ -260,9 +260,9 @@ def _from_factorized(cls, values, original): Whether the intervals are closed on the left-side, right-side, both or neither. copy : bool, default False - copy the data + Copy the data. dtype : dtype or None, default None - If None, dtype will be inferred + If None, dtype will be inferred. .. versionadded:: 0.23.0 @@ -383,16 +383,16 @@ def from_arrays(cls, left, right, closed="right", copy=False, dtype=None): Parameters ---------- data : array-like (1-dimensional) - Array of tuples + Array of tuples. closed : {'left', 'right', 'both', 'neither'}, default 'right' Whether the intervals are closed on the left-side, right-side, both or neither. copy : bool, default False - by-default copy the data, this is compat only and ignored + By-default copy the data, this is compat only and ignored. dtype : dtype or None, default None - If None, dtype will be inferred + If None, dtype will be inferred. - ..versionadded:: 0.23.0 + .. versionadded:: 0.23.0 Returns ------- From 40d52815eb83136cf151c12c4618547c907acc54 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Wed, 6 Nov 2019 11:30:49 -0500 Subject: [PATCH 2/6] PR09 in pandas.api --- pandas/_libs/lib.pyx | 9 +++++---- pandas/core/dtypes/concat.py | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pandas/_libs/lib.pyx b/pandas/_libs/lib.pyx index 328b67b6722f1..a14efd3313eaf 100644 --- a/pandas/_libs/lib.pyx +++ b/pandas/_libs/lib.pyx @@ -125,7 +125,7 @@ def is_scalar(val: object) -> bool: - Interval - DateOffset - Fraction - - Number + - Number. Returns ------- @@ -867,9 +867,10 @@ def is_list_like(obj: object, allow_sets: bool = True): Parameters ---------- - obj : The object to check - allow_sets : boolean, default True - If this parameter is False, sets will not be considered list-like + obj : object + The object to check. + allow_sets : bool, default True + If this parameter is False, sets will not be considered list-like. .. versionadded:: 0.24.0 diff --git a/pandas/core/dtypes/concat.py b/pandas/core/dtypes/concat.py index f2176f573207c..5e53da273e021 100644 --- a/pandas/core/dtypes/concat.py +++ b/pandas/core/dtypes/concat.py @@ -185,13 +185,14 @@ def concat_categorical(to_concat, axis=0): def union_categoricals(to_union, sort_categories=False, ignore_order=False): """ - Combine list-like of Categorical-like, unioning categories. All - categories must have the same dtype. + Combine list-like of Categorical-like, unioning categories. + + All categories must have the same dtype. Parameters ---------- - to_union : list-like of Categorical, CategoricalIndex, - or Series with dtype='category' + to_union : list-like + Categorical, CategoricalIndex, or Series with dtype='category'. sort_categories : bool, default False If true, resulting categories will be lexsorted, otherwise they will be ordered as they appear in the data. @@ -201,7 +202,7 @@ def union_categoricals(to_union, sort_categories=False, ignore_order=False): Returns ------- - result : Categorical + Categorical Raises ------ From 8ef6c75153843bbe51c9f090737d99f62c742cb1 Mon Sep 17 00:00:00 2001 From: hughkelley Date: Wed, 6 Nov 2019 11:39:12 -0500 Subject: [PATCH 3/6] PR09 in pandas.testing --- pandas/util/testing.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index f3b0226547c78..5a2f189ad8d10 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -593,14 +593,14 @@ def assert_index_equal( check_less_precise : bool or int, default False Specify comparison precision. Only used when check_exact is False. 5 digits (False) or 3 digits (True) after decimal points are compared. - If int, then specify the digits to compare + If int, then specify the digits to compare. check_exact : bool, default True Whether to compare number exactly. check_categorical : bool, default True Whether to compare internal Categorical exactly. obj : str, default 'Index' Specify object name being compared, internally used to show appropriate - assertion message + assertion message. """ __tracebackhide__ = True @@ -1273,10 +1273,7 @@ def assert_frame_equal( check whether it is equivalent to 1 within the specified precision. check_names : bool, default True Whether to check that the `names` attribute for both the `index` - and `column` attributes of the DataFrame is identical, i.e. - - * left.index.names == right.index.names - * left.columns.names == right.columns.names + and `column` attributes of the DataFrame is identical. by_blocks : bool, default False Specify how to compare internal data. If False, compare by columns. If True, compare by blocks. From 1297adc9ec071e8d2883aaceae0e1b24015b343f Mon Sep 17 00:00:00 2001 From: hughkelley Date: Wed, 6 Nov 2019 11:54:01 -0500 Subject: [PATCH 4/6] PR09 in pandas.core.resample --- pandas/core/resample.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/core/resample.py b/pandas/core/resample.py index e68a2efc3f4e6..bdfc2228ca62d 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -441,7 +441,7 @@ def pad(self, limit=None): Parameters ---------- limit : int, optional - limit of how many values to fill + Limit of how many values to fill. Returns ------- @@ -856,7 +856,7 @@ def var(self, ddof=1, *args, **kwargs): Parameters ---------- ddof : int, default 1 - degrees of freedom + Degrees of freedom. Returns ------- @@ -1237,11 +1237,11 @@ def _upsample(self, method, limit=None, fill_value=None): Parameters ---------- method : string {'backfill', 'bfill', 'pad', 'ffill'} - method for upsampling + Method for upsampling. limit : int, default None - Maximum size gap to fill when reindexing + Maximum size gap to fill when reindexing. fill_value : scalar, default None - Value to use for missing values + Value to use for missing values. See Also -------- From abb9df3adcfc650e4499ab048e1ab0e99e81582b Mon Sep 17 00:00:00 2001 From: hughkelley Date: Wed, 6 Nov 2019 11:59:27 -0500 Subject: [PATCH 5/6] PR09 in pandas.read_html --- pandas/io/html.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandas/io/html.py b/pandas/io/html.py index 7da7a819f81e8..9a368907b65aa 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -960,7 +960,7 @@ def read_html( This value is converted to a regular expression so that there is consistent behavior between Beautiful Soup and lxml. - flavor : str or None, container of strings + flavor : str or None The parsing engine to use. 'bs4' and 'html5lib' are synonymous with each other, they are both there for backwards compatibility. The default of ``None`` tries to use ``lxml`` to parse and if that fails it @@ -974,7 +974,7 @@ def read_html( The column (or list of columns) to use to create the index. skiprows : int or list-like or slice or None, optional - 0-based. Number of rows to skip after parsing the column integer. If a + Number of rows to skip after parsing the column integer. 0-based. If a sequence of integers or a slice is given, will skip the rows indexed by that sequence. Note that a single element sequence means 'skip the nth row' whereas an integer means 'skip n rows'. @@ -1024,18 +1024,19 @@ def read_html( transformed content. na_values : iterable, default None - Custom NA values + Custom NA values. keep_default_na : bool, default True If na_values are specified and keep_default_na is False the default NaN - values are overridden, otherwise they're appended to + values are overridden, otherwise they're appended to. displayed_only : bool, default True - Whether elements with "display: none" should be parsed + Whether elements with "display: none" should be parsed. Returns ------- - dfs : list of DataFrames + dfs + A list of DataFrames. See Also -------- From 25aaa31222b477eec7b69e6be51563f76e0be7ac Mon Sep 17 00:00:00 2001 From: hughkelley Date: Wed, 6 Nov 2019 12:02:01 -0500 Subject: [PATCH 6/6] whitespace --- pandas/core/dtypes/concat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/dtypes/concat.py b/pandas/core/dtypes/concat.py index 5e53da273e021..a62d3d0f4e65b 100644 --- a/pandas/core/dtypes/concat.py +++ b/pandas/core/dtypes/concat.py @@ -191,7 +191,7 @@ def union_categoricals(to_union, sort_categories=False, ignore_order=False): Parameters ---------- - to_union : list-like + to_union : list-like Categorical, CategoricalIndex, or Series with dtype='category'. sort_categories : bool, default False If true, resulting categories will be lexsorted, otherwise