Skip to content

Commit c7ceff9

Browse files
martinagvilasjorisvandenbossche
authored andcommitted
DOC: Fix docstrings lack of punctuation (#28031)
1 parent d5ba4c1 commit c7ceff9

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

pandas/core/arrays/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def fillna(self, value=None, method=None, limit=None):
514514

515515
def dropna(self):
516516
"""
517-
Return ExtensionArray without NA values
517+
Return ExtensionArray without NA values.
518518
519519
Returns
520520
-------
@@ -957,7 +957,7 @@ def _concat_same_type(
957957
cls, to_concat: Sequence[ABCExtensionArray]
958958
) -> ABCExtensionArray:
959959
"""
960-
Concatenate multiple array
960+
Concatenate multiple array.
961961
962962
Parameters
963963
----------

pandas/core/arrays/datetimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ def tz_localize(self, tz, ambiguous="raise", nonexistent="raise", errors=None):
11581158
def to_pydatetime(self):
11591159
"""
11601160
Return Datetime Array/Index as object ndarray of datetime.datetime
1161-
objects
1161+
objects.
11621162
11631163
Returns
11641164
-------
@@ -1283,7 +1283,7 @@ def to_perioddelta(self, freq):
12831283
"""
12841284
Calculate TimedeltaArray of difference between index
12851285
values and index converted to PeriodArray at specified
1286-
freq. Used for vectorized offsets
1286+
freq. Used for vectorized offsets.
12871287
12881288
Parameters
12891289
----------

pandas/core/arrays/period.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def __array__(self, dtype=None):
426426
@property
427427
def is_leap_year(self):
428428
"""
429-
Logical indicating if the date belongs to a leap year
429+
Logical indicating if the date belongs to a leap year.
430430
"""
431431
return isleapyear_arr(np.asarray(self.year))
432432

pandas/core/indexes/datetimes.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ def _get_time_micros(self):
661661
def to_series(self, keep_tz=None, index=None, name=None):
662662
"""
663663
Create a Series with both index and values equal to the index keys
664-
useful with map for returning an indexer based on an index
664+
useful with map for returning an indexer based on an index.
665665
666666
Parameters
667667
----------
@@ -687,10 +687,10 @@ def to_series(self, keep_tz=None, index=None, name=None):
687687
behaviour and silence the warning.
688688
689689
index : Index, optional
690-
index of resulting Series. If None, defaults to original index
691-
name : string, optional
692-
name of resulting Series. If None, defaults to name of original
693-
index
690+
Index of resulting Series. If None, defaults to original index.
691+
name : str, optional
692+
Name of resulting Series. If None, defaults to name of original
693+
index.
694694
695695
Returns
696696
-------
@@ -735,7 +735,7 @@ def to_series(self, keep_tz=None, index=None, name=None):
735735

736736
def snap(self, freq="S"):
737737
"""
738-
Snap time stamps to nearest occurring frequency
738+
Snap time stamps to nearest occurring frequency.
739739
740740
Returns
741741
-------

pandas/core/indexes/multi.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ def _set_names(self, names, level=None, validate=True):
12501250
self.levels[l].rename(name, inplace=True)
12511251

12521252
names = property(
1253-
fset=_set_names, fget=_get_names, doc="""\nNames of levels in MultiIndex\n"""
1253+
fset=_set_names, fget=_get_names, doc="""\nNames of levels in MultiIndex.\n"""
12541254
)
12551255

12561256
@Appender(_index_shared_docs["_get_grouper_for_level"])
@@ -1762,7 +1762,7 @@ def is_all_dates(self):
17621762

17631763
def is_lexsorted(self):
17641764
"""
1765-
Return True if the codes are lexicographically sorted
1765+
Return True if the codes are lexicographically sorted.
17661766
17671767
Returns
17681768
-------
@@ -2246,7 +2246,7 @@ def swaplevel(self, i=-2, j=-1):
22462246

22472247
def reorder_levels(self, order):
22482248
"""
2249-
Rearrange levels using input order. May not drop or duplicate levels
2249+
Rearrange levels using input order. May not drop or duplicate levels.
22502250
22512251
Parameters
22522252
----------

pandas/core/indexes/timedeltas.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,20 @@ class TimedeltaIndex(
6868
):
6969
"""
7070
Immutable ndarray of timedelta64 data, represented internally as int64, and
71-
which can be boxed to timedelta objects
71+
which can be boxed to timedelta objects.
7272
7373
Parameters
7474
----------
7575
data : array-like (1-dimensional), optional
76-
Optional timedelta-like data to construct index with
76+
Optional timedelta-like data to construct index with.
7777
unit : unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional
78-
which is an integer/float number
79-
freq : string or pandas offset object, optional
78+
Which is an integer/float number.
79+
freq : str or pandas offset object, optional
8080
One of pandas date offset strings or corresponding objects. The string
8181
'infer' can be passed in order to set the frequency of the index as the
82-
inferred frequency upon creation
82+
inferred frequency upon creation.
8383
copy : bool
84-
Make a copy of input ndarray
84+
Make a copy of input ndarray.
8585
start : starting value, timedelta-like, optional
8686
If data is None, start is used as the start point in generating regular
8787
timedelta data.
@@ -90,24 +90,24 @@ class TimedeltaIndex(
9090
9191
periods : int, optional, > 0
9292
Number of periods to generate, if generating index. Takes precedence
93-
over end argument
93+
over end argument.
9494
9595
.. deprecated:: 0.24.0
9696
9797
end : end time, timedelta-like, optional
9898
If periods is none, generated index will extend to first conforming
99-
time on or just past end argument
99+
time on or just past end argument.
100100
101101
.. deprecated:: 0.24. 0
102102
103-
closed : string or None, default None
103+
closed : str or None, default None
104104
Make the interval closed with respect to the given frequency to
105-
the 'left', 'right', or both sides (None)
105+
the 'left', 'right', or both sides (None).
106106
107107
.. deprecated:: 0.24. 0
108108
109109
name : object
110-
Name to be stored in the index
110+
Name to be stored in the index.
111111
112112
Attributes
113113
----------

pandas/core/indexing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def get_indexers_list():
4949
# the public IndexSlicerMaker
5050
class _IndexSlice:
5151
"""
52-
Create an object to more easily perform multi-index slicing
52+
Create an object to more easily perform multi-index slicing.
5353
5454
See Also
5555
--------

0 commit comments

Comments
 (0)