@@ -304,7 +304,7 @@ class DataFrame(NDFrame):
304
304
Parameters
305
305
----------
306
306
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.
308
308
309
309
.. versionchanged:: 0.23.0
310
310
If data is a dict, column order follows insertion-order for
@@ -316,14 +316,14 @@ class DataFrame(NDFrame):
316
316
317
317
index : Index or array-like
318
318
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.
320
320
columns : Index or array-like
321
321
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.
323
323
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.
325
325
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.
327
327
328
328
See Also
329
329
--------
@@ -1544,20 +1544,20 @@ def from_records(
1544
1544
data : ndarray (structured dtype), list of tuples, dict, or DataFrame
1545
1545
index : str, list of fields, array-like
1546
1546
Field of array to use as the index, alternately a specific set of
1547
- input labels to use
1547
+ input labels to use.
1548
1548
exclude : sequence, default None
1549
- Columns or fields to exclude
1549
+ Columns or fields to exclude.
1550
1550
columns : sequence, default None
1551
1551
Column names to use. If the passed data do not have names
1552
1552
associated with them, this argument provides names for the
1553
1553
columns. Otherwise this argument indicates the order of the columns
1554
1554
in the result (any names not found in the data will become all-NA
1555
- columns)
1555
+ columns).
1556
1556
coerce_float : bool, default False
1557
1557
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.
1559
1559
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.
1561
1561
1562
1562
Returns
1563
1563
-------
@@ -2118,8 +2118,8 @@ def to_parquet(
2118
2118
.. versionadded:: 0.24.0
2119
2119
2120
2120
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.
2123
2123
2124
2124
.. versionadded:: 0.24.0
2125
2125
@@ -3460,9 +3460,9 @@ def insert(self, loc, column, value, allow_duplicates=False):
3460
3460
Parameters
3461
3461
----------
3462
3462
loc : int
3463
- Insertion index. Must verify 0 <= loc <= len(columns)
3463
+ Insertion index. Must verify 0 <= loc <= len(columns).
3464
3464
column : str, number, or hashable object
3465
- label of the inserted column
3465
+ Label of the inserted column.
3466
3466
value : int, Series, or array-like
3467
3467
allow_duplicates : bool, optional
3468
3468
"""
@@ -3681,9 +3681,9 @@ def lookup(self, row_labels, col_labels):
3681
3681
Parameters
3682
3682
----------
3683
3683
row_labels : sequence
3684
- The row labels to use for lookup
3684
+ The row labels to use for lookup.
3685
3685
col_labels : sequence
3686
- The column labels to use for lookup
3686
+ The column labels to use for lookup.
3687
3687
3688
3688
Returns
3689
3689
-------
@@ -4770,14 +4770,14 @@ def drop_duplicates(self, subset=None, keep="first", inplace=False):
4770
4770
----------
4771
4771
subset : column label or sequence of labels, optional
4772
4772
Only consider certain columns for identifying duplicates, by
4773
- default use all of the columns
4773
+ default use all of the columns.
4774
4774
keep : {'first', 'last', False}, default 'first'
4775
4775
Determines which duplicates (if any) to keep.
4776
4776
- ``first`` : Drop duplicates except for the first occurrence.
4777
4777
- ``last`` : Drop duplicates except for the last occurrence.
4778
4778
- False : Drop all duplicates.
4779
4779
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.
4781
4781
4782
4782
Returns
4783
4783
-------
@@ -4805,7 +4805,7 @@ def duplicated(self, subset=None, keep="first"):
4805
4805
----------
4806
4806
subset : column label or sequence of labels, optional
4807
4807
Only consider certain columns for identifying duplicates, by
4808
- default use all of the columns
4808
+ default use all of the columns.
4809
4809
keep : {'first', 'last', False}, default 'first'
4810
4810
Determines which duplicates (if any) to mark.
4811
4811
@@ -6233,9 +6233,9 @@ def unstack(self, level=-1, fill_value=None):
6233
6233
Parameters
6234
6234
----------
6235
6235
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.
6237
6237
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.
6239
6239
6240
6240
Returns
6241
6241
-------
@@ -7368,7 +7368,8 @@ def corr(self, method="pearson", min_periods=1):
7368
7368
* callable: callable with input two 1d ndarrays
7369
7369
and returning a float. Note that the returned matrix from corr
7370
7370
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
+
7372
7373
.. versionadded:: 0.24.0
7373
7374
7374
7375
min_periods : int, optional
@@ -7572,7 +7573,7 @@ def corrwith(self, other, axis=0, drop=False, method="pearson"):
7572
7573
* kendall : Kendall Tau correlation coefficient
7573
7574
* spearman : Spearman rank correlation
7574
7575
* callable: callable with input two 1d ndarrays
7575
- and returning a float
7576
+ and returning a float.
7576
7577
7577
7578
.. versionadded:: 0.24.0
7578
7579
@@ -8037,7 +8038,8 @@ def mode(self, axis=0, numeric_only=False, dropna=True):
8037
8038
The axis to iterate over while searching for the mode:
8038
8039
8039
8040
* 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
+
8041
8043
numeric_only : bool, default False
8042
8044
If True, only apply to numeric columns.
8043
8045
dropna : bool, default True
0 commit comments