@@ -214,7 +214,7 @@ def contains(cat, key, container):
214214
215215class  Categorical (ExtensionArray , PandasObject ):
216216 """ 
217-  Represent 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 
@@ -235,7 +235,7 @@ class Categorical(ExtensionArray, PandasObject):
235235 The unique categories for this categorical. If not given, the 
236236 categories are assumed to be the unique values of `values` (sorted, if 
237237 possible, otherwise in the order in which they appear). 
238-  ordered : boolean, ( default False)  
238+  ordered : bool,  default False 
239239 Whether or not this categorical is treated as a ordered categorical. 
240240 If True, the resulting categorical will be ordered. 
241241 An ordered categorical respects, when sorted, the order of its 
@@ -253,7 +253,7 @@ class Categorical(ExtensionArray, PandasObject):
253253 codes : ndarray 
254254 The codes (integer positions, which point to the categories) of this 
255255 categorical, read only. 
256-  ordered : boolean  
256+  ordered : bool  
257257 Whether or not this Categorical is ordered. 
258258 dtype : CategoricalDtype 
259259 The instance of ``CategoricalDtype`` storing the ``categories`` 
@@ -297,7 +297,7 @@ class Categorical(ExtensionArray, PandasObject):
297297 Ordered `Categoricals` can be sorted according to the custom order 
298298 of the categories and can have a min and max value. 
299299
300-  >>> c = pd.Categorical(['a','b','c','a','b','c'], ordered=True, 
300+  >>> c = pd.Categorical(['a',  'b',  'c',  'a',  'b',  'c'], ordered=True, 
301301 ... categories=['c', 'b', 'a']) 
302302 >>> c 
303303 [a, b, c, a, b, c] 
@@ -618,7 +618,7 @@ def from_codes(cls, codes, categories=None, ordered=None, dtype=None):
618618 ---------- 
619619 codes : array-like, integers 
620620 An integer array, where each integer points to a category in 
621-  categories or dtype.categories, or else is -1 for NaN 
621+  categories or dtype.categories, or else is -1 for NaN.  
622622 categories : index-like, optional 
623623 The categories for the categorical. Items need to be unique. 
624624 If the categories are not given here, then they must be provided 
@@ -700,7 +700,7 @@ def _set_categories(self, categories, fastpath=False):
700700
701701 Parameters 
702702 ---------- 
703-  fastpath : boolean ( default:  False)  
703+  fastpath : bool,  default False 
704704 Don't perform validation of the categories for uniqueness or nulls 
705705
706706 Examples 
@@ -747,15 +747,15 @@ def _set_dtype(self, dtype):
747747
748748 def  set_ordered (self , value , inplace = False ):
749749 """ 
750-  Set the ordered attribute to the boolean value 
750+  Set the ordered attribute to the boolean value.  
751751
752752 Parameters 
753753 ---------- 
754-  value : boolean to set whether this categorical is ordered (True) or  
755-  not (False) 
756-  inplace : boolean ( default:  False)  
757-  Whether or not to set the ordered attribute inplace  or return a copy  
758-  of this categorical with ordered set to the value 
754+  value : bool  
755+  Set whether this categorical is ordered (True) or  not (False).  
756+  inplace : bool,  default False 
757+  Whether or not to set the ordered attribute in-place  or return 
758+  a copy  of this categorical with ordered set to the value.  
759759 """ 
760760 inplace  =  validate_bool_kwarg (inplace , 'inplace' )
761761 new_dtype  =  CategoricalDtype (self .categories , ordered = value )
@@ -770,9 +770,9 @@ def as_ordered(self, inplace=False):
770770
771771 Parameters 
772772 ---------- 
773-  inplace : boolean ( default:  False)  
774-  Whether or not to set the ordered attribute inplace  or return a copy  
775-  of this categorical with ordered set to True 
773+  inplace : bool,  default False 
774+  Whether or not to set the ordered attribute in-place  or return 
775+  a copy  of this categorical with ordered set to True.  
776776 """ 
777777 inplace  =  validate_bool_kwarg (inplace , 'inplace' )
778778 return  self .set_ordered (True , inplace = inplace )
@@ -783,9 +783,9 @@ def as_unordered(self, inplace=False):
783783
784784 Parameters 
785785 ---------- 
786-  inplace : boolean ( default:  False)  
787-  Whether or not to set the ordered attribute inplace  or return a copy  
788-  of this categorical with ordered set to False 
786+  inplace : bool,  default False 
787+  Whether or not to set the ordered attribute in-place  or return 
788+  a copy  of this categorical with ordered set to False.  
789789 """ 
790790 inplace  =  validate_bool_kwarg (inplace , 'inplace' )
791791 return  self .set_ordered (False , inplace = inplace )
@@ -815,19 +815,19 @@ def set_categories(self, new_categories, ordered=None, rename=False,
815815 ---------- 
816816 new_categories : Index-like 
817817 The categories in new order. 
818-  ordered : boolean, ( default:  False)  
818+  ordered : bool,  default False 
819819 Whether or not the categorical is treated as a ordered categorical. 
820820 If not given, do not change the ordered information. 
821-  rename : boolean ( default:  False)  
821+  rename : bool,  default False 
822822 Whether or not the new_categories should be considered as a rename 
823823 of the old categories or as reordered categories. 
824-  inplace : boolean ( default:  False)  
825-  Whether or not to reorder the categories inplace  or return a copy of  
826-  this categorical with reordered categories. 
824+  inplace : bool,  default False 
825+  Whether or not to reorder the categories in-place  or return a copy 
826+  of  this categorical with reordered categories. 
827827
828828 Returns 
829829 ------- 
830-  cat :  Categorical with reordered categories or None if inplace. 
830+  Categorical with reordered categories or None if inplace. 
831831
832832 Raises 
833833 ------ 
@@ -890,7 +890,7 @@ def rename_categories(self, new_categories, inplace=False):
890890 Currently, Series are considered list like. In a future version 
891891 of pandas they'll be considered dict-like. 
892892
893-  inplace : boolean ( default:  False)  
893+  inplace : bool,  default False 
894894 Whether or not to rename the categories inplace or return a copy of 
895895 this categorical with renamed categories. 
896896
@@ -967,10 +967,10 @@ def reorder_categories(self, new_categories, ordered=None, inplace=False):
967967 ---------- 
968968 new_categories : Index-like 
969969 The categories in new order. 
970-  ordered : boolean , optional 
970+  ordered : bool , optional 
971971 Whether or not the categorical is treated as a ordered categorical. 
972972 If not given, do not change the ordered information. 
973-  inplace : boolean ( default:  False)  
973+  inplace : bool,  default False 
974974 Whether or not to reorder the categories inplace or return a copy of 
975975 this categorical with reordered categories. 
976976
@@ -1010,7 +1010,7 @@ def add_categories(self, new_categories, inplace=False):
10101010 ---------- 
10111011 new_categories : category or list-like of category 
10121012 The new categories to be included. 
1013-  inplace : boolean ( default:  False)  
1013+  inplace : bool,  default False 
10141014 Whether or not to add the categories inplace or return a copy of 
10151015 this categorical with added categories. 
10161016
@@ -1060,7 +1060,7 @@ def remove_categories(self, removals, inplace=False):
10601060 ---------- 
10611061 removals : category or list of categories 
10621062 The categories which should be removed. 
1063-  inplace : boolean ( default:  False)  
1063+  inplace : bool,  default False 
10641064 Whether or not to remove the categories inplace or return a copy of 
10651065 this categorical with removed categories. 
10661066
@@ -1108,7 +1108,7 @@ def remove_unused_categories(self, inplace=False):
11081108
11091109 Parameters 
11101110 ---------- 
1111-  inplace : boolean ( default:  False)  
1111+  inplace : bool,  default False 
11121112 Whether or not to drop unused categories inplace or return a copy of 
11131113 this categorical with unused categories dropped. 
11141114
@@ -1460,7 +1460,7 @@ def value_counts(self, dropna=True):
14601460
14611461 Parameters 
14621462 ---------- 
1463-  dropna : boolean , default True 
1463+  dropna : bool , default True 
14641464 Don't include counts of NaN. 
14651465
14661466 Returns 
@@ -1581,9 +1581,9 @@ def sort_values(self, inplace=False, ascending=True, na_position='last'):
15811581
15821582 Parameters 
15831583 ---------- 
1584-  inplace : boolean , default False 
1584+  inplace : bool , default False 
15851585 Do operation in place. 
1586-  ascending : boolean , default True 
1586+  ascending : bool , default True 
15871587 Order ascending. Passing False orders descending. The 
15881588 ordering parameter provides the method by which the 
15891589 category values are organized. 
@@ -2239,7 +2239,7 @@ def mode(self, dropna=True):
22392239
22402240 Parameters 
22412241 ---------- 
2242-  dropna : boolean , default True 
2242+  dropna : bool , default True 
22432243 Don't consider counts of NaN/NaT. 
22442244
22452245 .. versionadded:: 0.24.0 
@@ -2332,7 +2332,7 @@ def equals(self, other):
23322332
23332333 Returns 
23342334 ------- 
2335-  are_equal : boolean  
2335+  bool  
23362336 """ 
23372337 if  self .is_dtype_equal (other ):
23382338 if  self .categories .equals (other .categories ):
@@ -2356,7 +2356,7 @@ def is_dtype_equal(self, other):
23562356
23572357 Returns 
23582358 ------- 
2359-  are_equal : boolean  
2359+  bool  
23602360 """ 
23612361
23622362 try :
0 commit comments