Skip to content

Commit 2988afb

Browse files
tolaa001WillAyd
authored andcommitted
Doc contribution pr06 (#28644)
1 parent cc7367c commit 2988afb

File tree

8 files changed

+73
-73
lines changed

8 files changed

+73
-73
lines changed

pandas/core/frame.py

+20-20
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class DataFrame(NDFrame):
322322
RangeIndex (0, 1, 2, ..., n) if no column labels are provided
323323
dtype : dtype, default None
324324
Data type to force. Only a single dtype is allowed. If None, infer
325-
copy : boolean, default False
325+
copy : bool, default False
326326
Copy data from inputs. Only affects DataFrame / 2d ndarray input
327327
328328
See Also
@@ -1542,7 +1542,7 @@ def from_records(
15421542
Parameters
15431543
----------
15441544
data : ndarray (structured dtype), list of tuples, dict, or DataFrame
1545-
index : string, list of fields, array-like
1545+
index : str, list of fields, array-like
15461546
Field of array to use as the index, alternately a specific set of
15471547
input labels to use
15481548
exclude : sequence, default None
@@ -1553,7 +1553,7 @@ def from_records(
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
15551555
columns)
1556-
coerce_float : boolean, default False
1556+
coerce_float : bool, default False
15571557
Attempt to convert values of non-string, non-numeric objects (like
15581558
decimal.Decimal) to floating point, useful for SQL result sets
15591559
nrows : int, default None
@@ -3461,7 +3461,7 @@ def insert(self, loc, column, value, allow_duplicates=False):
34613461
----------
34623462
loc : int
34633463
Insertion index. Must verify 0 <= loc <= len(columns)
3464-
column : string, number, or hashable object
3464+
column : str, number, or hashable object
34653465
label of the inserted column
34663466
value : int, Series, or array-like
34673467
allow_duplicates : bool, optional
@@ -4775,7 +4775,7 @@ def drop_duplicates(self, subset=None, keep="first", inplace=False):
47754775
- ``first`` : Drop duplicates except for the first occurrence.
47764776
- ``last`` : Drop duplicates except for the last occurrence.
47774777
- False : Drop all duplicates.
4778-
inplace : boolean, default False
4778+
inplace : bool, default False
47794779
Whether to drop duplicates in place or to return a copy
47804780
47814781
Returns
@@ -5197,7 +5197,7 @@ def swaplevel(self, i=-2, j=-1, axis=0):
51975197
51985198
Parameters
51995199
----------
5200-
i, j : int, string (can be mixed)
5200+
i, j : int, str (can be mixed)
52015201
Level of index to be swapped. Can pass level name as string.
52025202
52035203
Returns
@@ -5723,12 +5723,12 @@ def update(
57235723
57245724
Parameters
57255725
----------%s
5726-
index : string or object, optional
5726+
index : str or object, optional
57275727
Column to use to make new frame's index. If None, uses
57285728
existing index.
5729-
columns : string or object
5729+
columns : str or object
57305730
Column to use to make new frame's columns.
5731-
values : string, object or a list of the previous, optional
5731+
values : str, object or a list of the previous, optional
57325732
Column(s) to use for populating new frame's values. If not
57335733
specified, all remaining columns will be used and the result will
57345734
have hierarchically indexed columns.
@@ -5850,14 +5850,14 @@ def pivot(self, index=None, columns=None, values=None):
58505850
is function or list of functions
58515851
fill_value : scalar, default None
58525852
Value to replace missing values with
5853-
margins : boolean, default False
5853+
margins : bool, default False
58545854
Add all row / columns (e.g. for subtotal / grand totals)
5855-
dropna : boolean, default True
5855+
dropna : bool, default True
58565856
Do not include columns whose entries are all NaN
5857-
margins_name : string, default 'All'
5857+
margins_name : str, default 'All'
58585858
Name of the row / column that will contain the totals
58595859
when margins is True.
5860-
observed : boolean, default False
5860+
observed : bool, default False
58615861
This only applies if any of the groupers are Categoricals.
58625862
If True: only show observed values for categorical groupers.
58635863
If False: show all values for categorical groupers.
@@ -6231,7 +6231,7 @@ def unstack(self, level=-1, fill_value=None):
62316231
62326232
Parameters
62336233
----------
6234-
level : int, string, or list of these, default -1 (last level)
6234+
level : int, str, or list of these, default -1 (last level)
62356235
Level(s) of index to unstack, can pass level name
62366236
fill_value : replace NaN with this value if the unstack produces
62376237
missing values
@@ -6305,7 +6305,7 @@ def unstack(self, level=-1, fill_value=None):
63056305
``frame.columns.name`` or 'variable'.
63066306
value_name : scalar, default 'value'
63076307
Name to use for the 'value' column.
6308-
col_level : int or string, optional
6308+
col_level : int or str, optional
63096309
If columns are a MultiIndex then use this level to melt.
63106310
63116311
Returns
@@ -6894,11 +6894,11 @@ def append(self, other, ignore_index=False, verify_integrity=False, sort=None):
68946894
----------
68956895
other : DataFrame or Series/dict-like object, or list of these
68966896
The data to append.
6897-
ignore_index : boolean, default False
6897+
ignore_index : bool, default False
68986898
If True, do not use the index labels.
6899-
verify_integrity : boolean, default False
6899+
verify_integrity : bool, default False
69006900
If True, raise ValueError on creating index with duplicates.
6901-
sort : boolean, default None
6901+
sort : bool, default None
69026902
Sort columns if the columns of `self` and `other` are not aligned.
69036903
The default sorting is deprecated and will change to not-sorting
69046904
in a future version of pandas. Explicitly pass ``sort=True`` to
@@ -7940,7 +7940,7 @@ def idxmin(self, axis=0, skipna=True):
79407940
----------
79417941
axis : {0 or 'index', 1 or 'columns'}, default 0
79427942
0 or 'index' for row-wise, 1 or 'columns' for column-wise
7943-
skipna : boolean, default True
7943+
skipna : bool, default True
79447944
Exclude NA/null values. If an entire row/column is NA, the result
79457945
will be NA.
79467946
@@ -7977,7 +7977,7 @@ def idxmax(self, axis=0, skipna=True):
79777977
----------
79787978
axis : {0 or 'index', 1 or 'columns'}, default 0
79797979
0 or 'index' for row-wise, 1 or 'columns' for column-wise
7980-
skipna : boolean, default True
7980+
skipna : bool, default True
79817981
Exclude NA/null values. If an entire row/column is NA, the result
79827982
will be NA.
79837983

pandas/core/groupby/groupby.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ class GroupBy(_GroupBy):
10321032
Most users should ignore this
10331033
exclusions : array-like, optional
10341034
List of columns to exclude
1035-
name : string
1035+
name : str
10361036
Most users should ignore this
10371037
10381038
Returns
@@ -1253,7 +1253,7 @@ def std(self, ddof=1, *args, **kwargs):
12531253
12541254
Parameters
12551255
----------
1256-
ddof : integer, default 1
1256+
ddof : int, default 1
12571257
degrees of freedom
12581258
12591259
Returns
@@ -1276,7 +1276,7 @@ def var(self, ddof=1, *args, **kwargs):
12761276
12771277
Parameters
12781278
----------
1279-
ddof : integer, default 1
1279+
ddof : int, default 1
12801280
degrees of freedom
12811281
12821282
Returns
@@ -1311,7 +1311,7 @@ def sem(self, ddof=1):
13111311
13121312
Parameters
13131313
----------
1314-
ddof : integer, default 1
1314+
ddof : int, default 1
13151315
degrees of freedom
13161316
13171317
Returns
@@ -1623,7 +1623,7 @@ def pad(self, limit=None):
16231623
16241624
Parameters
16251625
----------
1626-
limit : integer, optional
1626+
limit : int, optional
16271627
limit of how many values to fill
16281628
16291629
Returns
@@ -1649,7 +1649,7 @@ def backfill(self, limit=None):
16491649
16501650
Parameters
16511651
----------
1652-
limit : integer, optional
1652+
limit : int, optional
16531653
limit of how many values to fill
16541654
16551655
Returns
@@ -2099,13 +2099,13 @@ def rank(
20992099
* max: highest rank in group
21002100
* first: ranks assigned in order they appear in the array
21012101
* dense: like 'min', but rank always increases by 1 between groups
2102-
ascending : boolean, default True
2102+
ascending : bool, default True
21032103
False for ranks by high (1) to low (N)
21042104
na_option : {'keep', 'top', 'bottom'}, default 'keep'
21052105
* keep: leave NA values where they are
21062106
* top: smallest rank if ascending
21072107
* bottom: smallest rank if descending
2108-
pct : boolean, default False
2108+
pct : bool, default False
21092109
Compute percentage rank of data within each group
21102110
axis : int, default 0
21112111
The axis of the object over which to compute the rank.
@@ -2313,7 +2313,7 @@ def shift(self, periods=1, freq=None, axis=0, fill_value=None):
23132313
23142314
Parameters
23152315
----------
2316-
periods : integer, default 1
2316+
periods : int, default 1
23172317
number of periods to shift
23182318
freq : frequency string
23192319
axis : axis to shift, default 0

pandas/core/groupby/grouper.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ class Grouper:
4848
4949
Parameters
5050
----------
51-
key : string, defaults to None
51+
key : str, defaults to None
5252
groupby key, which selects the grouping column of the target
5353
level : name/number, defaults to None
5454
the level for the target index
55-
freq : string / frequency object, defaults to None
55+
freq : str / frequency object, defaults to None
5656
This will groupby the specified frequency if the target selection
5757
(via key or level) is a datetime-like object. For full specification
5858
of available frequencies, please see `here
5959
<http://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_.
6060
axis : number/name of the axis, defaults to 0
61-
sort : boolean, default to False
61+
sort : bool, default to False
6262
whether to sort the resulting labels
6363
closed : {'left' or 'right'}
6464
Closed end of interval. Only when `freq` parameter is passed.
@@ -69,7 +69,7 @@ class Grouper:
6969
If grouper is PeriodIndex and `freq` parameter is passed.
7070
base : int, default 0
7171
Only when `freq` parameter is passed.
72-
loffset : string, DateOffset, timedelta object
72+
loffset : str, DateOffset, timedelta object
7373
Only when `freq` parameter is passed.
7474
7575
Returns

pandas/core/indexes/base.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,8 @@ def repeat(self, repeats, axis=None):
904904
905905
Parameters
906906
----------
907-
name : string, optional
908-
deep : boolean, default False
907+
name : str, optional
908+
deep : bool, default False
909909
dtype : numpy dtype or pandas type
910910
911911
Returns
@@ -1172,7 +1172,7 @@ def to_series(self, index=None, name=None):
11721172
----------
11731173
index : Index, optional
11741174
index of resulting Series. If None, defaults to original index
1175-
name : string, optional
1175+
name : str, optional
11761176
name of resulting Series. If None, defaults to name of original
11771177
index
11781178
@@ -1198,7 +1198,7 @@ def to_frame(self, index=True, name=None):
11981198
11991199
Parameters
12001200
----------
1201-
index : boolean, default True
1201+
index : bool, default True
12021202
Set the index of the returned DataFrame as the original Index.
12031203
12041204
name : object, default None
@@ -1401,7 +1401,7 @@ def rename(self, name, inplace=False):
14011401
----------
14021402
name : label or list of labels
14031403
Name(s) to set.
1404-
inplace : boolean, default False
1404+
inplace : bool, default False
14051405
Modifies the object directly, instead of creating a new Index or
14061406
MultiIndex.
14071407
@@ -1494,7 +1494,7 @@ def sortlevel(self, level=None, ascending=True, sort_remaining=None):
14941494
14951495
Parameters
14961496
----------
1497-
ascending : boolean, default True
1497+
ascending : bool, default True
14981498
False to sort in descending order
14991499
15001500
level, sort_remaining are compat parameters
@@ -3416,8 +3416,8 @@ def _reindex_non_unique(self, target):
34163416
other : Index
34173417
how : {'left', 'right', 'inner', 'outer'}
34183418
level : int or level name, default None
3419-
return_indexers : boolean, default False
3420-
sort : boolean, default False
3419+
return_indexers : bool, default False
3420+
sort : bool, default False
34213421
Sort the join keys lexicographically in the result Index. If False,
34223422
the order of the join keys depends on the join type (how keyword)
34233423
@@ -3943,7 +3943,7 @@ def memory_usage(self, deep=False):
39433943
39443944
Parameters
39453945
----------
3946-
cond : boolean array-like with the same length as self
3946+
cond : bool array-like with the same length as self
39473947
other : scalar, or array-like
39483948
39493949
Returns
@@ -4925,7 +4925,7 @@ def slice_indexer(self, start=None, end=None, step=None, kind=None):
49254925
end : label, default None
49264926
If None, defaults to the end
49274927
step : int, default None
4928-
kind : string, default None
4928+
kind : str, default None
49294929
49304930
Returns
49314931
-------

0 commit comments

Comments
 (0)