Skip to content

DOC: Fix docstrings lack of punctuation #28031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def fillna(self, value=None, method=None, limit=None):

def dropna(self):
"""
Return ExtensionArray without NA values
Return ExtensionArray without NA values.

Returns
-------
Expand Down Expand Up @@ -957,7 +957,7 @@ def _concat_same_type(
cls, to_concat: Sequence[ABCExtensionArray]
) -> ABCExtensionArray:
"""
Concatenate multiple array
Concatenate multiple array.

Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ def tz_localize(self, tz, ambiguous="raise", nonexistent="raise", errors=None):
def to_pydatetime(self):
"""
Return Datetime Array/Index as object ndarray of datetime.datetime
objects
objects.

Returns
-------
Expand Down Expand Up @@ -1283,7 +1283,7 @@ def to_perioddelta(self, freq):
"""
Calculate TimedeltaArray of difference between index
values and index converted to PeriodArray at specified
freq. Used for vectorized offsets
freq. Used for vectorized offsets.

Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def __array__(self, dtype=None):
@property
def is_leap_year(self):
"""
Logical indicating if the date belongs to a leap year
Logical indicating if the date belongs to a leap year.
"""
return isleapyear_arr(np.asarray(self.year))

Expand Down
12 changes: 6 additions & 6 deletions pandas/core/indexes/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def _get_time_micros(self):
def to_series(self, keep_tz=None, index=None, name=None):
"""
Create a Series with both index and values equal to the index keys
useful with map for returning an indexer based on an index
useful with map for returning an indexer based on an index.

Parameters
----------
Expand All @@ -687,10 +687,10 @@ def to_series(self, keep_tz=None, index=None, name=None):
behaviour and silence the warning.

index : Index, optional
index of resulting Series. If None, defaults to original index
name : string, optional
name of resulting Series. If None, defaults to name of original
index
Index of resulting Series. If None, defaults to original index.
name : str, optional
Name of resulting Series. If None, defaults to name of original
index.

Returns
-------
Expand Down Expand Up @@ -735,7 +735,7 @@ def to_series(self, keep_tz=None, index=None, name=None):

def snap(self, freq="S"):
"""
Snap time stamps to nearest occurring frequency
Snap time stamps to nearest occurring frequency.

Returns
-------
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ def _set_names(self, names, level=None, validate=True):
self.levels[l].rename(name, inplace=True)

names = property(
fset=_set_names, fget=_get_names, doc="""\nNames of levels in MultiIndex\n"""
fset=_set_names, fget=_get_names, doc="""\nNames of levels in MultiIndex.\n"""
)

@Appender(_index_shared_docs["_get_grouper_for_level"])
Expand Down Expand Up @@ -1762,7 +1762,7 @@ def is_all_dates(self):

def is_lexsorted(self):
"""
Return True if the codes are lexicographically sorted
Return True if the codes are lexicographically sorted.

Returns
-------
Expand Down Expand Up @@ -2246,7 +2246,7 @@ def swaplevel(self, i=-2, j=-1):

def reorder_levels(self, order):
"""
Rearrange levels using input order. May not drop or duplicate levels
Rearrange levels using input order. May not drop or duplicate levels.

Parameters
----------
Expand Down
22 changes: 11 additions & 11 deletions pandas/core/indexes/timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ class TimedeltaIndex(
):
"""
Immutable ndarray of timedelta64 data, represented internally as int64, and
which can be boxed to timedelta objects
which can be boxed to timedelta objects.

Parameters
----------
data : array-like (1-dimensional), optional
Optional timedelta-like data to construct index with
Optional timedelta-like data to construct index with.
unit : unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional
which is an integer/float number
freq : string or pandas offset object, optional
Which is an integer/float number.
freq : str or pandas offset object, optional
One of pandas date offset strings or corresponding objects. The string
'infer' can be passed in order to set the frequency of the index as the
inferred frequency upon creation
inferred frequency upon creation.
copy : bool
Make a copy of input ndarray
Make a copy of input ndarray.
start : starting value, timedelta-like, optional
If data is None, start is used as the start point in generating regular
timedelta data.
Expand All @@ -90,24 +90,24 @@ class TimedeltaIndex(

periods : int, optional, > 0
Number of periods to generate, if generating index. Takes precedence
over end argument
over end argument.

.. deprecated:: 0.24.0

end : end time, timedelta-like, optional
If periods is none, generated index will extend to first conforming
time on or just past end argument
time on or just past end argument.

.. deprecated:: 0.24. 0

closed : string or None, default None
closed : str or None, default None
Make the interval closed with respect to the given frequency to
the 'left', 'right', or both sides (None)
the 'left', 'right', or both sides (None).

.. deprecated:: 0.24. 0

name : object
Name to be stored in the index
Name to be stored in the index.

Attributes
----------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_indexers_list():
# the public IndexSlicerMaker
class _IndexSlice:
"""
Create an object to more easily perform multi-index slicing
Create an object to more easily perform multi-index slicing.

See Also
--------
Expand Down