@@ -131,7 +131,7 @@ class NDFrame(PandasObject, SelectionMixin):
131
131
----------
132
132
data : BlockManager
133
133
axes : list
134
- copy : boolean , default False
134
+ copy : bool , default False
135
135
"""
136
136
137
137
_internal_names = [
@@ -280,16 +280,17 @@ def _setup_axes(
280
280
ns = None ,
281
281
docs = None ,
282
282
):
283
- """Provide axes setup for the major PandasObjects.
283
+ """
284
+ Provide axes setup for the major PandasObjects.
284
285
285
286
Parameters
286
287
----------
287
288
axes : the names of the axes in order (lowest to highest)
288
289
info_axis_num : the axis of the selector dimension (int)
289
290
stat_axis_num : the number of axis for the default stats (int)
290
291
aliases : other names for a single axis (dict)
291
- axes_are_reversed : boolean whether to treat passed axes as
292
- reversed (DataFrame)
292
+ axes_are_reversed : bool
293
+ Whether to treat passed axes as reversed (DataFrame).
293
294
build_axes : setup the axis properties (default True)
294
295
"""
295
296
@@ -676,7 +677,7 @@ def transpose(self, *args, **kwargs):
676
677
Parameters
677
678
----------
678
679
args : %(args_transpose)s
679
- copy : boolean , default False
680
+ copy : bool , default False
680
681
Make a copy of the underlying data. Mixed-dtype data will
681
682
always result in a copy
682
683
**kwargs
@@ -2257,10 +2258,10 @@ def to_json(
2257
2258
2258
2259
Parameters
2259
2260
----------
2260
- path_or_buf : string or file handle, optional
2261
+ path_or_buf : str or file handle, optional
2261
2262
File path or object. If not specified, the result is returned as
2262
2263
a string.
2263
- orient : string
2264
+ orient : str
2264
2265
Indication of expected JSON string format.
2265
2266
2266
2267
* Series
@@ -2539,7 +2540,7 @@ def to_msgpack(self, path_or_buf=None, encoding="utf-8", **kwargs):
2539
2540
2540
2541
def to_sql (
2541
2542
self ,
2542
- name ,
2543
+ name : str ,
2543
2544
con ,
2544
2545
schema = None ,
2545
2546
if_exists = "fail" ,
@@ -2557,12 +2558,12 @@ def to_sql(
2557
2558
2558
2559
Parameters
2559
2560
----------
2560
- name : string
2561
+ name : str
2561
2562
Name of SQL table.
2562
2563
con : sqlalchemy.engine.Engine or sqlite3.Connection
2563
2564
Using SQLAlchemy makes it possible to use any DB supported by that
2564
2565
library. Legacy support is provided for sqlite3.Connection objects.
2565
- schema : string , optional
2566
+ schema : str , optional
2566
2567
Specify the schema (if database flavor supports this). If None, use
2567
2568
default schema.
2568
2569
if_exists : {'fail', 'replace', 'append'}, default 'fail'
@@ -2575,7 +2576,7 @@ def to_sql(
2575
2576
index : bool, default True
2576
2577
Write DataFrame index as a column. Uses `index_label` as the column
2577
2578
name in the table.
2578
- index_label : string or sequence, default None
2579
+ index_label : str or sequence, default None
2579
2580
Column label for index column(s). If None is given (default) and
2580
2581
`index` is True, then the index names are used.
2581
2582
A sequence should be given if the DataFrame uses MultiIndex.
@@ -3251,11 +3252,10 @@ def _maybe_update_cacher(self, clear=False, verify_is_copy=True):
3251
3252
3252
3253
Parameters
3253
3254
----------
3254
- clear : boolean, default False
3255
- clear the item cache
3256
- verify_is_copy : boolean, default True
3257
- provide is_copy checks
3258
-
3255
+ clear : bool, default False
3256
+ Clear the item cache.
3257
+ verify_is_copy : bool, default True
3258
+ Provide is_copy checks.
3259
3259
"""
3260
3260
3261
3261
cacher = getattr (self , "_cacher" , None )
@@ -3621,11 +3621,11 @@ def _check_setitem_copy(self, stacklevel=4, t="setting", force=False):
3621
3621
3622
3622
Parameters
3623
3623
----------
3624
- stacklevel : integer , default 4
3624
+ stacklevel : int , default 4
3625
3625
the level to show of the stack when the error is output
3626
- t : string , the type of setting error
3627
- force : boolean , default False
3628
- if True, then force showing an error
3626
+ t : str , the type of setting error
3627
+ force : bool , default False
3628
+ If True, then force showing an error.
3629
3629
3630
3630
validate if we are doing a setitem on a chained copy.
3631
3631
@@ -3954,9 +3954,8 @@ def _update_inplace(self, result, verify_is_copy=True):
3954
3954
3955
3955
Parameters
3956
3956
----------
3957
- verify_is_copy : boolean, default True
3958
- provide is_copy checks
3959
-
3957
+ verify_is_copy : bool, default True
3958
+ Provide is_copy checks.
3960
3959
"""
3961
3960
# NOTE: This does *not* call __finalize__ and that's an explicit
3962
3961
# decision that we may revisit in the future.
@@ -4571,9 +4570,9 @@ def filter(self, items=None, like=None, regex=None, axis=None):
4571
4570
----------
4572
4571
items : list-like
4573
4572
Keep labels from axis which are in items.
4574
- like : string
4573
+ like : str
4575
4574
Keep labels from axis for which "like in label == True".
4576
- regex : string (regular expression)
4575
+ regex : str (regular expression)
4577
4576
Keep labels from axis for which re.search(regex, label) == True.
4578
4577
axis : int or string axis name
4579
4578
The axis to filter on. By default this is the info axis,
@@ -5233,8 +5232,8 @@ def _consolidate(self, inplace=False):
5233
5232
5234
5233
Parameters
5235
5234
----------
5236
- inplace : boolean , default False
5237
- If False return new object, otherwise modify existing object
5235
+ inplace : bool , default False
5236
+ If False return new object, otherwise modify existing object.
5238
5237
5239
5238
Returns
5240
5239
-------
@@ -5680,11 +5679,12 @@ def as_blocks(self, copy=True):
5680
5679
5681
5680
Parameters
5682
5681
----------
5683
- copy : boolean , default True
5682
+ copy : bool , default True
5684
5683
5685
5684
Returns
5686
5685
-------
5687
- values : a dict of dtype -> Constructor Types
5686
+ dict
5687
+ Mapping dtype -> Constructor Types.
5688
5688
"""
5689
5689
warnings .warn (
5690
5690
"as_blocks is deprecated and will be removed in a future version" ,
@@ -5993,17 +5993,17 @@ def _convert(
5993
5993
5994
5994
Parameters
5995
5995
----------
5996
- datetime : boolean , default False
5996
+ datetime : bool , default False
5997
5997
If True, convert to date where possible.
5998
- numeric : boolean , default False
5998
+ numeric : bool , default False
5999
5999
If True, attempt to convert to numbers (including strings), with
6000
6000
unconvertible values becoming NaN.
6001
- timedelta : boolean , default False
6001
+ timedelta : bool , default False
6002
6002
If True, convert to timedelta where possible.
6003
- coerce : boolean , default False
6003
+ coerce : bool , default False
6004
6004
If True, force conversion with unconvertible values converted to
6005
- nulls (NaN or NaT)
6006
- copy : boolean , default True
6005
+ nulls (NaN or NaT).
6006
+ copy : bool , default True
6007
6007
If True, return a copy even if no copy is necessary (e.g. no
6008
6008
conversion was done). Note: This is meant for internal use, and
6009
6009
should not be confused with inplace.
@@ -7870,7 +7870,7 @@ def asfreq(self, freq, method=None, how=None, normalize=False, fill_value=None):
7870
7870
7871
7871
Parameters
7872
7872
----------
7873
- freq : DateOffset object, or string
7873
+ freq : DateOffset or str
7874
7874
method : {'backfill'/'bfill', 'pad'/'ffill'}, default None
7875
7875
Method to use for filling holes in reindexed Series (note this
7876
7876
does not fill NaNs that already were present):
@@ -8671,7 +8671,7 @@ def ranker(data):
8671
8671
level : int or level name, default None
8672
8672
Broadcast across a level, matching Index values on the
8673
8673
passed MultiIndex level
8674
- copy : boolean , default True
8674
+ copy : bool , default True
8675
8675
Always returns new objects. If copy=False and no reindexing is
8676
8676
required then original objects are returned.
8677
8677
fill_value : scalar, default np.NaN
@@ -9463,7 +9463,7 @@ def truncate(self, before=None, after=None, axis=None, copy=True):
9463
9463
Truncate all rows after this index value.
9464
9464
axis : {0 or 'index', 1 or 'columns'}, optional
9465
9465
Axis to truncate. Truncates the index (rows) by default.
9466
- copy : boolean , default is True,
9466
+ copy : bool , default is True,
9467
9467
Return a copy of the truncated section.
9468
9468
9469
9469
Returns
@@ -9607,13 +9607,13 @@ def tz_convert(self, tz, axis=0, level=None, copy=True):
9607
9607
9608
9608
Parameters
9609
9609
----------
9610
- tz : string or pytz.timezone object
9610
+ tz : str or tzinfo object
9611
9611
axis : the axis to convert
9612
9612
level : int, str, default None
9613
- If axis ia a MultiIndex, convert a specific level. Otherwise
9614
- must be None
9615
- copy : boolean , default True
9616
- Also make a copy of the underlying data
9613
+ If axis is a MultiIndex, convert a specific level. Otherwise
9614
+ must be None.
9615
+ copy : bool , default True
9616
+ Also make a copy of the underlying data.
9617
9617
9618
9618
Returns
9619
9619
-------
@@ -9667,12 +9667,12 @@ def tz_localize(
9667
9667
9668
9668
Parameters
9669
9669
----------
9670
- tz : string or pytz.timezone object
9670
+ tz : str or tzinfo
9671
9671
axis : the axis to localize
9672
9672
level : int, str, default None
9673
9673
If axis ia a MultiIndex, localize a specific level. Otherwise
9674
9674
must be None
9675
- copy : boolean , default True
9675
+ copy : bool , default True
9676
9676
Also make a copy of the underlying data
9677
9677
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
9678
9678
When clocks moved backward due to DST, ambiguous times may arise.
@@ -11009,7 +11009,7 @@ def _doc_parms(cls):
11009
11009
----------
11010
11010
axis : {0 or 'index', 1 or 'columns'}, default 0
11011
11011
The index or the name of the axis. 0 is equivalent to None or 'index'.
11012
- skipna : boolean , default True
11012
+ skipna : bool , default True
11013
11013
Exclude NA/null values. If an entire row/column is NA, the result
11014
11014
will be NA.
11015
11015
*args, **kwargs :
0 commit comments