Skip to content

Commit b104954

Browse files
Josiah BakerWillAyd
Josiah Baker
authored andcommitted
DOC: fix pr09,pr08 errors in frame.py (#28728)
1 parent bbfd4ba commit b104954

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

pandas/core/frame.py

+26-24
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ class DataFrame(NDFrame):
304304
Parameters
305305
----------
306306
data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame
307-
Dict can contain Series, arrays, constants, or list-like objects
307+
Dict can contain Series, arrays, constants, or list-like objects.
308308
309309
.. versionchanged:: 0.23.0
310310
If data is a dict, column order follows insertion-order for
@@ -316,14 +316,14 @@ class DataFrame(NDFrame):
316316
317317
index : Index or array-like
318318
Index to use for resulting frame. Will default to RangeIndex if
319-
no indexing information part of input data and no index provided
319+
no indexing information part of input data and no index provided.
320320
columns : Index or array-like
321321
Column labels to use for resulting frame. Will default to
322-
RangeIndex (0, 1, 2, ..., n) if no column labels are provided
322+
RangeIndex (0, 1, 2, ..., n) if no column labels are provided.
323323
dtype : dtype, default None
324-
Data type to force. Only a single dtype is allowed. If None, infer
324+
Data type to force. Only a single dtype is allowed. If None, infer.
325325
copy : bool, default False
326-
Copy data from inputs. Only affects DataFrame / 2d ndarray input
326+
Copy data from inputs. Only affects DataFrame / 2d ndarray input.
327327
328328
See Also
329329
--------
@@ -1544,20 +1544,20 @@ def from_records(
15441544
data : ndarray (structured dtype), list of tuples, dict, or DataFrame
15451545
index : str, list of fields, array-like
15461546
Field of array to use as the index, alternately a specific set of
1547-
input labels to use
1547+
input labels to use.
15481548
exclude : sequence, default None
1549-
Columns or fields to exclude
1549+
Columns or fields to exclude.
15501550
columns : sequence, default None
15511551
Column names to use. If the passed data do not have names
15521552
associated with them, this argument provides names for the
15531553
columns. Otherwise this argument indicates the order of the columns
15541554
in the result (any names not found in the data will become all-NA
1555-
columns)
1555+
columns).
15561556
coerce_float : bool, default False
15571557
Attempt to convert values of non-string, non-numeric objects (like
1558-
decimal.Decimal) to floating point, useful for SQL result sets
1558+
decimal.Decimal) to floating point, useful for SQL result sets.
15591559
nrows : int, default None
1560-
Number of rows to read if data is an iterator
1560+
Number of rows to read if data is an iterator.
15611561
15621562
Returns
15631563
-------
@@ -2118,8 +2118,8 @@ def to_parquet(
21182118
.. versionadded:: 0.24.0
21192119
21202120
partition_cols : list, optional, default None
2121-
Column names by which to partition the dataset
2122-
Columns are partitioned in the order they are given
2121+
Column names by which to partition the dataset.
2122+
Columns are partitioned in the order they are given.
21232123
21242124
.. versionadded:: 0.24.0
21252125
@@ -3460,9 +3460,9 @@ def insert(self, loc, column, value, allow_duplicates=False):
34603460
Parameters
34613461
----------
34623462
loc : int
3463-
Insertion index. Must verify 0 <= loc <= len(columns)
3463+
Insertion index. Must verify 0 <= loc <= len(columns).
34643464
column : str, number, or hashable object
3465-
label of the inserted column
3465+
Label of the inserted column.
34663466
value : int, Series, or array-like
34673467
allow_duplicates : bool, optional
34683468
"""
@@ -3681,9 +3681,9 @@ def lookup(self, row_labels, col_labels):
36813681
Parameters
36823682
----------
36833683
row_labels : sequence
3684-
The row labels to use for lookup
3684+
The row labels to use for lookup.
36853685
col_labels : sequence
3686-
The column labels to use for lookup
3686+
The column labels to use for lookup.
36873687
36883688
Returns
36893689
-------
@@ -4770,14 +4770,14 @@ def drop_duplicates(self, subset=None, keep="first", inplace=False):
47704770
----------
47714771
subset : column label or sequence of labels, optional
47724772
Only consider certain columns for identifying duplicates, by
4773-
default use all of the columns
4773+
default use all of the columns.
47744774
keep : {'first', 'last', False}, default 'first'
47754775
Determines which duplicates (if any) to keep.
47764776
- ``first`` : Drop duplicates except for the first occurrence.
47774777
- ``last`` : Drop duplicates except for the last occurrence.
47784778
- False : Drop all duplicates.
47794779
inplace : bool, default False
4780-
Whether to drop duplicates in place or to return a copy
4780+
Whether to drop duplicates in place or to return a copy.
47814781
47824782
Returns
47834783
-------
@@ -4805,7 +4805,7 @@ def duplicated(self, subset=None, keep="first"):
48054805
----------
48064806
subset : column label or sequence of labels, optional
48074807
Only consider certain columns for identifying duplicates, by
4808-
default use all of the columns
4808+
default use all of the columns.
48094809
keep : {'first', 'last', False}, default 'first'
48104810
Determines which duplicates (if any) to mark.
48114811
@@ -6233,9 +6233,9 @@ def unstack(self, level=-1, fill_value=None):
62336233
Parameters
62346234
----------
62356235
level : int, str, or list of these, default -1 (last level)
6236-
Level(s) of index to unstack, can pass level name
6236+
Level(s) of index to unstack, can pass level name.
62376237
fill_value : int, string or dict
6238-
Replace NaN with this value if the unstack produces missing values
6238+
Replace NaN with this value if the unstack produces missing values.
62396239
62406240
Returns
62416241
-------
@@ -7368,7 +7368,8 @@ def corr(self, method="pearson", min_periods=1):
73687368
* callable: callable with input two 1d ndarrays
73697369
and returning a float. Note that the returned matrix from corr
73707370
will have 1 along the diagonals and will be symmetric
7371-
regardless of the callable's behavior
7371+
regardless of the callable's behavior.
7372+
73727373
.. versionadded:: 0.24.0
73737374
73747375
min_periods : int, optional
@@ -7572,7 +7573,7 @@ def corrwith(self, other, axis=0, drop=False, method="pearson"):
75727573
* kendall : Kendall Tau correlation coefficient
75737574
* spearman : Spearman rank correlation
75747575
* callable: callable with input two 1d ndarrays
7575-
and returning a float
7576+
and returning a float.
75767577
75777578
.. versionadded:: 0.24.0
75787579
@@ -8037,7 +8038,8 @@ def mode(self, axis=0, numeric_only=False, dropna=True):
80378038
The axis to iterate over while searching for the mode:
80388039
80398040
* 0 or 'index' : get mode of each column
8040-
* 1 or 'columns' : get mode of each row
8041+
* 1 or 'columns' : get mode of each row.
8042+
80418043
numeric_only : bool, default False
80428044
If True, only apply to numeric columns.
80438045
dropna : bool, default True

0 commit comments

Comments
 (0)