@@ -214,7 +214,7 @@ def contains(cat, key, container):
214
214
215
215
class Categorical (ExtensionArray , PandasObject ):
216
216
"""
217
- Represents a categorical variable in classic R / S-plus fashion
217
+ Represent a categorical variable in classic R / S-plus fashion
218
218
219
219
`Categoricals` can only take on only a limited, and usually fixed, number
220
220
of possible values (`categories`). In contrast to statistical categorical
@@ -747,7 +747,7 @@ def _set_dtype(self, dtype):
747
747
748
748
def set_ordered (self , value , inplace = False ):
749
749
"""
750
- Sets the ordered attribute to the boolean value
750
+ Set the ordered attribute to the boolean value
751
751
752
752
Parameters
753
753
----------
@@ -793,7 +793,7 @@ def as_unordered(self, inplace=False):
793
793
def set_categories (self , new_categories , ordered = None , rename = False ,
794
794
inplace = False ):
795
795
"""
796
- Sets the categories to the specified new_categories.
796
+ Set the categories to the specified new_categories.
797
797
798
798
`new_categories` can include new categories (which will result in
799
799
unused categories) or remove old categories (which results in values
@@ -864,7 +864,7 @@ def set_categories(self, new_categories, ordered=None, rename=False,
864
864
865
865
def rename_categories (self , new_categories , inplace = False ):
866
866
"""
867
- Renames categories.
867
+ Rename categories.
868
868
869
869
Parameters
870
870
----------
@@ -958,7 +958,7 @@ def rename_categories(self, new_categories, inplace=False):
958
958
959
959
def reorder_categories (self , new_categories , ordered = None , inplace = False ):
960
960
"""
961
- Reorders categories as specified in new_categories.
961
+ Reorder categories as specified in new_categories.
962
962
963
963
`new_categories` need to include all old categories and no new category
964
964
items.
@@ -1051,7 +1051,7 @@ def add_categories(self, new_categories, inplace=False):
1051
1051
1052
1052
def remove_categories (self , removals , inplace = False ):
1053
1053
"""
1054
- Removes the specified categories.
1054
+ Remove the specified categories.
1055
1055
1056
1056
`removals` must be included in the old categories. Values which were in
1057
1057
the removed categories will be set to NaN
@@ -1104,7 +1104,7 @@ def remove_categories(self, removals, inplace=False):
1104
1104
1105
1105
def remove_unused_categories (self , inplace = False ):
1106
1106
"""
1107
- Removes categories which are not used.
1107
+ Remove categories which are not used.
1108
1108
1109
1109
Parameters
1110
1110
----------
@@ -1454,7 +1454,7 @@ def dropna(self):
1454
1454
1455
1455
def value_counts (self , dropna = True ):
1456
1456
"""
1457
- Returns a Series containing counts of each category.
1457
+ Return a Series containing counts of each category.
1458
1458
1459
1459
Every category will have an entry, even those with a count of 0.
1460
1460
@@ -1570,7 +1570,7 @@ def argsort(self, *args, **kwargs):
1570
1570
1571
1571
def sort_values (self , inplace = False , ascending = True , na_position = 'last' ):
1572
1572
"""
1573
- Sorts the Categorical by category value returning a new
1573
+ Sort the Categorical by category value returning a new
1574
1574
Categorical by default.
1575
1575
1576
1576
While an ordering is applied to the category values, sorting in this
0 commit comments