Skip to content

DOC: fix pr09,pr08 errors in frame.py #28728

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 3 commits into from
Oct 1, 2019
Merged
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
50 changes: 26 additions & 24 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class DataFrame(NDFrame):
Parameters
----------
data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame
Dict can contain Series, arrays, constants, or list-like objects
Dict can contain Series, arrays, constants, or list-like objects.

.. versionchanged:: 0.23.0
If data is a dict, column order follows insertion-order for
Expand All @@ -316,14 +316,14 @@ class DataFrame(NDFrame):

index : Index or array-like
Index to use for resulting frame. Will default to RangeIndex if
no indexing information part of input data and no index provided
no indexing information part of input data and no index provided.
columns : Index or array-like
Column labels to use for resulting frame. Will default to
RangeIndex (0, 1, 2, ..., n) if no column labels are provided
RangeIndex (0, 1, 2, ..., n) if no column labels are provided.
dtype : dtype, default None
Data type to force. Only a single dtype is allowed. If None, infer
Data type to force. Only a single dtype is allowed. If None, infer.
copy : bool, default False
Copy data from inputs. Only affects DataFrame / 2d ndarray input
Copy data from inputs. Only affects DataFrame / 2d ndarray input.

See Also
--------
Expand Down Expand Up @@ -1544,20 +1544,20 @@ def from_records(
data : ndarray (structured dtype), list of tuples, dict, or DataFrame
index : str, list of fields, array-like
Field of array to use as the index, alternately a specific set of
input labels to use
input labels to use.
exclude : sequence, default None
Columns or fields to exclude
Columns or fields to exclude.
columns : sequence, default None
Column names to use. If the passed data do not have names
associated with them, this argument provides names for the
columns. Otherwise this argument indicates the order of the columns
in the result (any names not found in the data will become all-NA
columns)
columns).
coerce_float : bool, default False
Attempt to convert values of non-string, non-numeric objects (like
decimal.Decimal) to floating point, useful for SQL result sets
decimal.Decimal) to floating point, useful for SQL result sets.
nrows : int, default None
Number of rows to read if data is an iterator
Number of rows to read if data is an iterator.

Returns
-------
Expand Down Expand Up @@ -2118,8 +2118,8 @@ def to_parquet(
.. versionadded:: 0.24.0

partition_cols : list, optional, default None
Column names by which to partition the dataset
Columns are partitioned in the order they are given
Column names by which to partition the dataset.
Columns are partitioned in the order they are given.

.. versionadded:: 0.24.0

Expand Down Expand Up @@ -3460,9 +3460,9 @@ def insert(self, loc, column, value, allow_duplicates=False):
Parameters
----------
loc : int
Insertion index. Must verify 0 <= loc <= len(columns)
Insertion index. Must verify 0 <= loc <= len(columns).
column : str, number, or hashable object
label of the inserted column
Label of the inserted column.
value : int, Series, or array-like
allow_duplicates : bool, optional
"""
Expand Down Expand Up @@ -3681,9 +3681,9 @@ def lookup(self, row_labels, col_labels):
Parameters
----------
row_labels : sequence
The row labels to use for lookup
The row labels to use for lookup.
col_labels : sequence
The column labels to use for lookup
The column labels to use for lookup.

Returns
-------
Expand Down Expand Up @@ -4770,14 +4770,14 @@ def drop_duplicates(self, subset=None, keep="first", inplace=False):
----------
subset : column label or sequence of labels, optional
Only consider certain columns for identifying duplicates, by
default use all of the columns
default use all of the columns.
keep : {'first', 'last', False}, default 'first'
Determines which duplicates (if any) to keep.
- ``first`` : Drop duplicates except for the first occurrence.
- ``last`` : Drop duplicates except for the last occurrence.
- False : Drop all duplicates.
inplace : bool, default False
Whether to drop duplicates in place or to return a copy
Whether to drop duplicates in place or to return a copy.

Returns
-------
Expand Down Expand Up @@ -4805,7 +4805,7 @@ def duplicated(self, subset=None, keep="first"):
----------
subset : column label or sequence of labels, optional
Only consider certain columns for identifying duplicates, by
default use all of the columns
default use all of the columns.
keep : {'first', 'last', False}, default 'first'
Determines which duplicates (if any) to mark.

Expand Down Expand Up @@ -6233,9 +6233,9 @@ def unstack(self, level=-1, fill_value=None):
Parameters
----------
level : int, str, or list of these, default -1 (last level)
Level(s) of index to unstack, can pass level name
Level(s) of index to unstack, can pass level name.
fill_value : int, string or dict
Replace NaN with this value if the unstack produces missing values
Replace NaN with this value if the unstack produces missing values.

Returns
-------
Expand Down Expand Up @@ -7368,7 +7368,8 @@ def corr(self, method="pearson", min_periods=1):
* 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
regardless of the callable's behavior.

.. versionadded:: 0.24.0

min_periods : int, optional
Expand Down Expand Up @@ -7572,7 +7573,7 @@ def corrwith(self, other, axis=0, drop=False, method="pearson"):
* kendall : Kendall Tau correlation coefficient
* spearman : Spearman rank correlation
* callable: callable with input two 1d ndarrays
and returning a float
and returning a float.

.. versionadded:: 0.24.0

Expand Down Expand Up @@ -8037,7 +8038,8 @@ def mode(self, axis=0, numeric_only=False, dropna=True):
The axis to iterate over while searching for the mode:

* 0 or 'index' : get mode of each column
* 1 or 'columns' : get mode of each row
* 1 or 'columns' : get mode of each row.

numeric_only : bool, default False
If True, only apply to numeric columns.
dropna : bool, default True
Expand Down