Skip to content

Commit e0d8470

Browse files
committed
Fix validation error SS05
1 parent d3c9d6e commit e0d8470

File tree

9 files changed

+28
-25
lines changed

9 files changed

+28
-25
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ class Timestamp(_Timestamp):
614614
"""
615615
Timestamp.now(tz=None)
616616
617-
Returns new Timestamp object representing current time local to
617+
Return new Timestamp object representing current time local to
618618
tz.
619619
620620
Parameters

pandas/core/arrays/categorical.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def contains(cat, key, container):
214214

215215
class Categorical(ExtensionArray, PandasObject):
216216
"""
217-
Represents a categorical variable in classic R / S-plus fashion
217+
Represent a categorical variable in classic R / S-plus fashion
218218
219219
`Categoricals` can only take on only a limited, and usually fixed, number
220220
of possible values (`categories`). In contrast to statistical categorical
@@ -747,7 +747,7 @@ def _set_dtype(self, dtype):
747747

748748
def set_ordered(self, value, inplace=False):
749749
"""
750-
Sets the ordered attribute to the boolean value
750+
Set the ordered attribute to the boolean value
751751
752752
Parameters
753753
----------
@@ -793,7 +793,7 @@ def as_unordered(self, inplace=False):
793793
def set_categories(self, new_categories, ordered=None, rename=False,
794794
inplace=False):
795795
"""
796-
Sets the categories to the specified new_categories.
796+
Set the categories to the specified new_categories.
797797
798798
`new_categories` can include new categories (which will result in
799799
unused categories) or remove old categories (which results in values
@@ -864,7 +864,7 @@ def set_categories(self, new_categories, ordered=None, rename=False,
864864

865865
def rename_categories(self, new_categories, inplace=False):
866866
"""
867-
Renames categories.
867+
Rename categories.
868868
869869
Parameters
870870
----------
@@ -958,7 +958,7 @@ def rename_categories(self, new_categories, inplace=False):
958958

959959
def reorder_categories(self, new_categories, ordered=None, inplace=False):
960960
"""
961-
Reorders categories as specified in new_categories.
961+
Reorder categories as specified in new_categories.
962962
963963
`new_categories` need to include all old categories and no new category
964964
items.
@@ -1051,7 +1051,7 @@ def add_categories(self, new_categories, inplace=False):
10511051

10521052
def remove_categories(self, removals, inplace=False):
10531053
"""
1054-
Removes the specified categories.
1054+
Remove the specified categories.
10551055
10561056
`removals` must be included in the old categories. Values which were in
10571057
the removed categories will be set to NaN
@@ -1104,7 +1104,7 @@ def remove_categories(self, removals, inplace=False):
11041104

11051105
def remove_unused_categories(self, inplace=False):
11061106
"""
1107-
Removes categories which are not used.
1107+
Remove categories which are not used.
11081108
11091109
Parameters
11101110
----------
@@ -1454,7 +1454,7 @@ def dropna(self):
14541454

14551455
def value_counts(self, dropna=True):
14561456
"""
1457-
Returns a Series containing counts of each category.
1457+
Return a Series containing counts of each category.
14581458
14591459
Every category will have an entry, even those with a count of 0.
14601460
@@ -1570,7 +1570,7 @@ def argsort(self, *args, **kwargs):
15701570

15711571
def sort_values(self, inplace=False, ascending=True, na_position='last'):
15721572
"""
1573-
Sorts the Categorical by category value returning a new
1573+
Sort the Categorical by category value returning a new
15741574
Categorical by default.
15751575
15761576
While an ordering is applied to the category values, sorting in this

pandas/core/dtypes/dtypes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818

1919
def register_extension_dtype(cls):
20-
"""Class decorator to register an ExtensionType with pandas.
20+
"""
21+
Register an ExtensionType with pandas as class decorator.
2122
2223
.. versionadded:: 0.24.0
2324

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6009,7 +6009,7 @@ def unstack(self, level=-1, fill_value=None):
60096009
return unstack(self, level, fill_value)
60106010

60116011
_shared_docs['melt'] = ("""
6012-
Unpivots a DataFrame from wide format to long format, optionally
6012+
Unpivot a DataFrame from wide format to long format, optionally
60136013
leaving identifier variables set.
60146014
60156015
This function is useful to massage a DataFrame into a format where one

pandas/core/groupby/generic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,9 @@ def true_and_notna(x, *args, **kwargs):
10211021
return filtered
10221022

10231023
def nunique(self, dropna=True):
1024-
""" Returns number of unique elements in the group """
1024+
"""
1025+
Return number of unique elements in the group.
1026+
"""
10251027
ids, _, _ = self.grouper.group_info
10261028

10271029
val = self.obj.get_values()

pandas/core/groupby/groupby.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def curried(x):
625625

626626
def get_group(self, name, obj=None):
627627
"""
628-
Constructs NDFrame from group with provided name.
628+
Construct NDFrame from group with provided name.
629629
630630
Parameters
631631
----------
@@ -1047,7 +1047,7 @@ def result_to_bool(result):
10471047
@Appender(_common_see_also)
10481048
def any(self, skipna=True):
10491049
"""
1050-
Returns True if any value in the group is truthful, else False.
1050+
Return True if any value in the group is truthful, else False.
10511051
10521052
Parameters
10531053
----------
@@ -1060,7 +1060,7 @@ def any(self, skipna=True):
10601060
@Appender(_common_see_also)
10611061
def all(self, skipna=True):
10621062
"""
1063-
Returns True if all values in the group are truthful, else False.
1063+
Return True if all values in the group are truthful, else False.
10641064
10651065
Parameters
10661066
----------
@@ -1813,7 +1813,7 @@ def cumcount(self, ascending=True):
18131813
def rank(self, method='average', ascending=True, na_option='keep',
18141814
pct=False, axis=0):
18151815
"""
1816-
Provides the rank of values within each group.
1816+
Provide the rank of values within each group.
18171817
18181818
Parameters
18191819
----------
@@ -2039,7 +2039,7 @@ def pct_change(self, periods=1, fill_method='pad', limit=None, freq=None,
20392039
@Substitution(name='groupby', see_also=_common_see_also)
20402040
def head(self, n=5):
20412041
"""
2042-
Returns first n rows of each group.
2042+
Return first n rows of each group.
20432043
20442044
Essentially equivalent to ``.apply(lambda x: x.head(n))``,
20452045
except ignores as_index flag.
@@ -2067,7 +2067,7 @@ def head(self, n=5):
20672067
@Substitution(name='groupby', see_also=_common_see_also)
20682068
def tail(self, n=5):
20692069
"""
2070-
Returns last n rows of each group.
2070+
Return last n rows of each group.
20712071
20722072
Essentially equivalent to ``.apply(lambda x: x.tail(n))``,
20732073
except ignores as_index flag.

pandas/core/indexes/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,7 +4049,7 @@ def putmask(self, mask, value):
40494049

40504050
def equals(self, other):
40514051
"""
4052-
Determines if two Index objects contain the same elements.
4052+
Determine if two Index objects contain the same elements.
40534053
"""
40544054
if self.is_(other):
40554055
return True
@@ -4144,7 +4144,7 @@ def asof(self, label):
41444144

41454145
def asof_locs(self, where, mask):
41464146
"""
4147-
Finds the locations (indices) of the labels from the index for
4147+
Find the locations (indices) of the labels from the index for
41484148
every entry in the `where` argument.
41494149
41504150
As in the `asof` function, if the label (a particular entry in

pandas/core/panel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ def construct_index_parts(idx, major=True):
999999

10001000
def apply(self, func, axis='major', **kwargs):
10011001
"""
1002-
Applies function along axis (or axes) of the Panel.
1002+
Apply function along axis (or axes) of the Panel.
10031003
10041004
Parameters
10051005
----------

pandas/core/series.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def nonzero(self):
580580

581581
def put(self, *args, **kwargs):
582582
"""
583-
Applies the `put` method to its `values` attribute if it has one.
583+
Apply the `put` method to its `values` attribute if it has one.
584584
585585
See Also
586586
--------
@@ -1456,7 +1456,7 @@ def iteritems(self):
14561456

14571457
def keys(self):
14581458
"""
1459-
Alias for index.
1459+
Return alias for index.
14601460
"""
14611461
return self.index
14621462

@@ -2987,7 +2987,7 @@ def sort_index(self, axis=0, level=None, ascending=True, inplace=False,
29872987

29882988
def argsort(self, axis=0, kind='quicksort', order=None):
29892989
"""
2990-
Overrides ndarray.argsort. Argsorts the value, omitting NA/null values,
2990+
Override ndarray.argsort. Argsorts the value, omitting NA/null values,
29912991
and places the result in the same locations as the non-NA values.
29922992
29932993
Parameters

0 commit comments

Comments
 (0)