Skip to content

Pr09 batch 3 #29434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def is_scalar(val: object) -> bool:
- Interval
- DateOffset
- Fraction
- Number
- Number.

Returns
-------
Expand Down Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions pandas/core/arrays/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
-------
Expand Down
11 changes: 6 additions & 5 deletions pandas/core/dtypes/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -201,7 +202,7 @@ def union_categoricals(to_union, sort_categories=False, ignore_order=False):

Returns
-------
result : Categorical
Categorical

Raises
------
Expand Down
10 changes: 5 additions & 5 deletions pandas/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down Expand Up @@ -856,7 +856,7 @@ def var(self, ddof=1, *args, **kwargs):
Parameters
----------
ddof : int, default 1
degrees of freedom
Degrees of freedom.

Returns
-------
Expand Down Expand Up @@ -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
--------
Expand Down
13 changes: 7 additions & 6 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'.
Expand Down Expand Up @@ -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
--------
Expand Down
9 changes: 3 additions & 6 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down