Skip to content

Commit c4751ca

Browse files
srinivasreddyPingviinituutti
authored andcommitted
Add missing spacing before or after a param name in docstrings (pandas-dev#23738)
1 parent 48193bf commit c4751ca

File tree

23 files changed

+130
-132
lines changed

23 files changed

+130
-132
lines changed

pandas/_libs/tslibs/nattype.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ class NaTType(_NaT):
648648
minute : int, optional
649649
second : int, optional
650650
microsecond : int, optional
651-
nanosecond: int, optional
651+
nanosecond : int, optional
652652
tzinfo : tz-convertible, optional
653653
fold : int, optional, default is 0
654654
added in 3.6, NotImplemented

pandas/_libs/tslibs/period.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ cdef class _Period(object):
17771777
freq : string or DateOffset
17781778
Target frequency. Default is 'D' if self.freq is week or
17791779
longer and 'S' otherwise
1780-
how: str, default 'S' (start)
1780+
how : str, default 'S' (start)
17811781
'S', 'E'. Can be aliased as case insensitive
17821782
'Start', 'Finish', 'Begin', 'End'
17831783

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ class Timestamp(_Timestamp):
11551155
minute : int, optional
11561156
second : int, optional
11571157
microsecond : int, optional
1158-
nanosecond: int, optional
1158+
nanosecond : int, optional
11591159
tzinfo : tz-convertible, optional
11601160
fold : int, optional, default is 0
11611161
added in 3.6, NotImplemented

pandas/compat/pickle_compat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ def load(fh, encoding=None, compat=False, is_verbose=False):
210210
211211
Parameters
212212
----------
213-
fh: a filelike object
214-
encoding: an optional encoding
215-
compat: provide Series compatibility mode, boolean, default False
216-
is_verbose: show exception output
213+
fh : a filelike object
214+
encoding : an optional encoding
215+
compat : provide Series compatibility mode, boolean, default False
216+
is_verbose : show exception output
217217
"""
218218

219219
try:

pandas/core/algorithms.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ def isin(comps, values):
387387
388388
Parameters
389389
----------
390-
comps: array-like
391-
values: array-like
390+
comps : array-like
391+
values : array-like
392392
393393
Returns
394394
-------
@@ -856,8 +856,8 @@ def rank(values, axis=0, method='average', na_option='keep',
856856
The method by which tiebreaks are broken during the ranking.
857857
na_option : {'keep', 'top'}, default 'keep'
858858
The method by which NaNs are placed in the ranking.
859-
- ``keep``: rank each NaN value with a NaN ranking
860-
- ``top``: replace each NaN with either +/- inf so that they
859+
- ``keep`` : rank each NaN value with a NaN ranking
860+
- ``top`` : replace each NaN with either +/- inf so that they
861861
there are ranked at the top
862862
ascending : boolean, default True
863863
Whether or not the elements should be ranked in ascending order.
@@ -1473,10 +1473,10 @@ def take(arr, indices, axis=0, allow_fill=False, fill_value=None):
14731473
allow_fill : bool, default False
14741474
How to handle negative values in `indices`.
14751475
1476-
* False: negative values in `indices` indicate positional indices
1476+
* False : negative values in `indices` indicate positional indices
14771477
from the right (the default). This is similar to :func:`numpy.take`.
14781478
1479-
* True: negative values in `indices` indicate
1479+
* True : negative values in `indices` indicate
14801480
missing values. These values are set to `fill_value`. Any other
14811481
other negative values raise a ``ValueError``.
14821482

pandas/core/arrays/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def to_perioddelta(self, freq):
925925
926926
Parameters
927927
----------
928-
freq: Period frequency
928+
freq : Period frequency
929929
930930
Returns
931931
-------

pandas/core/dtypes/concat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def union_categoricals(to_union, sort_categories=False, ignore_order=False):
231231
sort_categories : boolean, default False
232232
If true, resulting categories will be lexsorted, otherwise
233233
they will be ordered as they appear in the data.
234-
ignore_order: boolean, default False
234+
ignore_order : boolean, default False
235235
If true, the ordered attribute of the Categoricals will be ignored.
236236
Results in an unordered categorical.
237237

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True,
16891689
tupleize_cols : boolean, default False
16901690
write multi_index columns as a list of tuples (if True)
16911691
or new (expanded format) if False)
1692-
infer_datetime_format: boolean, default False
1692+
infer_datetime_format : boolean, default False
16931693
If True and `parse_dates` is True for a column, try to infer the
16941694
datetime format based on the first datetime string. If the format
16951695
can be inferred, there often will be a large parsing speed-up.

pandas/core/generic.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,14 +1482,14 @@ def _is_level_reference(self, key, axis=0):
14821482
14831483
Parameters
14841484
----------
1485-
key: str
1485+
key : str
14861486
Potential level name for the given axis
1487-
axis: int, default 0
1487+
axis : int, default 0
14881488
Axis that levels are associated with (0 for index, 1 for columns)
14891489
14901490
Returns
14911491
-------
1492-
is_level: bool
1492+
is_level : bool
14931493
"""
14941494
axis = self._get_axis_number(axis)
14951495

@@ -4871,7 +4871,7 @@ def as_matrix(self, columns=None):
48714871
48724872
Parameters
48734873
----------
4874-
columns: list, optional, default:None
4874+
columns : list, optional, default:None
48754875
If None, return all columns, otherwise, returns specified columns.
48764876
48774877
Returns
@@ -7307,7 +7307,7 @@ def asfreq(self, freq, method=None, how=None, normalize=False,
73077307
For PeriodIndex only, see PeriodIndex.asfreq
73087308
normalize : bool, default False
73097309
Whether to reset output index to midnight
7310-
fill_value: scalar, optional
7310+
fill_value : scalar, optional
73117311
Value to use for missing values, applied during upsampling (note
73127312
this does not fill NaNs that already were present).
73137313

pandas/core/indexes/timedeltas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class TimedeltaIndex(TimedeltaArray, DatetimeIndexOpsMixin,
4141
----------
4242
data : array-like (1-dimensional), optional
4343
Optional timedelta-like data to construct index with
44-
unit: unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional
44+
unit : unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional
4545
which is an integer/float number
4646
freq : string or pandas offset object, optional
4747
One of pandas date offset strings or corresponding objects. The string

0 commit comments

Comments
 (0)