Skip to content

DOC: Do no use 'type' as first word when specifying a return type (#21622) #21623

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 1 commit into from
Jun 25, 2018
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
2 changes: 1 addition & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4675,7 +4675,7 @@ def swaplevel(self, i=-2, j=-1, axis=0):

Returns
-------
swapped : type of caller (new object)
swapped : same type as caller (new object)

.. versionchanged:: 0.18.1

Expand Down
28 changes: 14 additions & 14 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def swaplevel(self, i=-2, j=-1, axis=0):

Returns
-------
swapped : type of caller (new object)
swapped : same type as caller (new object)

.. versionchanged:: 0.18.1

Expand Down Expand Up @@ -1073,7 +1073,7 @@ def _set_axis_name(self, name, axis=0, inplace=False):

Returns
-------
renamed : type of caller or None if inplace=True
renamed : same type as caller or None if inplace=True

See Also
--------
Expand Down Expand Up @@ -2468,7 +2468,7 @@ def get(self, key, default=None):

Returns
-------
value : type of items contained in object
value : same type as items contained in object
"""
try:
return self[key]
Expand Down Expand Up @@ -2768,7 +2768,7 @@ def __delitem__(self, key):

Returns
-------
taken : type of caller
taken : same type as caller
An array-like containing the elements taken from the object.

See Also
Expand Down Expand Up @@ -2824,7 +2824,7 @@ def _take(self, indices, axis=0, is_copy=True):

Returns
-------
taken : type of caller
taken : same type as caller
An array-like containing the elements taken from the object.

See Also
Expand Down Expand Up @@ -3033,7 +3033,7 @@ def select(self, crit, axis=0):

Returns
-------
selection : type of caller
selection : same type as caller
"""
warnings.warn("'select' is deprecated and will be removed in a "
"future release. You can use "
Expand Down Expand Up @@ -3924,7 +3924,7 @@ def head(self, n=5):

Returns
-------
obj_head : type of caller
obj_head : same type as caller
The first `n` rows of the caller object.

See Also
Expand Down Expand Up @@ -4447,7 +4447,7 @@ def _consolidate(self, inplace=False):

Returns
-------
consolidated : type of caller
consolidated : same type as caller
"""
inplace = validate_bool_kwarg(inplace, 'inplace')
if inplace:
Expand Down Expand Up @@ -4916,7 +4916,7 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs):

Returns
-------
casted : type of caller
casted : same type as caller

Examples
--------
Expand Down Expand Up @@ -6691,7 +6691,7 @@ def asfreq(self, freq, method=None, how=None, normalize=False,

Returns
-------
converted : type of caller
converted : same type as caller

Examples
--------
Expand Down Expand Up @@ -6772,7 +6772,7 @@ def at_time(self, time, asof=False):

Returns
-------
values_at_time : type of caller
values_at_time : same type as caller

Examples
--------
Expand Down Expand Up @@ -6826,7 +6826,7 @@ def between_time(self, start_time, end_time, include_start=True,

Returns
-------
values_between_time : type of caller
values_between_time : same type as caller

Examples
--------
Expand Down Expand Up @@ -7145,7 +7145,7 @@ def first(self, offset):

Returns
-------
subset : type of caller
subset : same type as caller

See Also
--------
Expand Down Expand Up @@ -7209,7 +7209,7 @@ def last(self, offset):

Returns
-------
subset : type of caller
subset : same type as caller

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ def get_group(self, name, obj=None):

Returns
-------
group : type of obj
group : same type as obj
"""
if obj is None:
obj = self._selected_obj
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/sparse/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def abs(self):

Returns
-------
abs: type of caller
abs: same type as caller
"""
return self._constructor(np.abs(self.values),
index=self.index).__finalize__(self)
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def _apply_window(self, mean=True, **kwargs):

Returns
-------
y : type of input argument
y : same type as input argument

"""
window = self._prep_window(**kwargs)
Expand Down Expand Up @@ -2139,7 +2139,7 @@ def _apply(self, func, **kwargs):

Returns
-------
y : type of input argument
y : same type as input argument

"""
blocks, obj, index = self._create_blocks()
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/packers.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):

Returns
-------
obj : type of object stored in file
obj : same type as object stored in file

"""
path_or_buf, _, _, should_close = get_filepath_or_buffer(path_or_buf)
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def read_pickle(path, compression='infer'):

Returns
-------
unpickled : type of object stored in file
unpickled : same type as object stored in file

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def get(self, key):

Returns
-------
obj : type of object stored in file
obj : same type as object stored in file
"""
group = self.get_node(key)
if group is None:
Expand Down