@@ -723,8 +723,8 @@ def as_ordered(self, inplace=False):
723
723
724
724
Returns
725
725
-------
726
- Categorical
727
- Ordered Categorical.
726
+ Categorical or None
727
+ Ordered Categorical or None if ``inplace=True`` .
728
728
"""
729
729
inplace = validate_bool_kwarg (inplace , "inplace" )
730
730
return self .set_ordered (True , inplace = inplace )
@@ -741,8 +741,8 @@ def as_unordered(self, inplace=False):
741
741
742
742
Returns
743
743
-------
744
- Categorical
745
- Unordered Categorical.
744
+ Categorical or None
745
+ Unordered Categorical or None if ``inplace=True`` .
746
746
"""
747
747
inplace = validate_bool_kwarg (inplace , "inplace" )
748
748
return self .set_ordered (False , inplace = inplace )
@@ -848,8 +848,7 @@ def rename_categories(self, new_categories, inplace=False):
848
848
Returns
849
849
-------
850
850
cat : Categorical or None
851
- With ``inplace=False``, the new categorical is returned.
852
- With ``inplace=True``, there is no return value.
851
+ Categorical with removed categories or None if ``inplace=True``.
853
852
854
853
Raises
855
854
------
@@ -917,7 +916,8 @@ def reorder_categories(self, new_categories, ordered=None, inplace=False):
917
916
918
917
Returns
919
918
-------
920
- cat : Categorical with reordered categories or None if inplace.
919
+ cat : Categorical or None
920
+ Categorical with removed categories or None if ``inplace=True``.
921
921
922
922
Raises
923
923
------
@@ -957,7 +957,8 @@ def add_categories(self, new_categories, inplace=False):
957
957
958
958
Returns
959
959
-------
960
- cat : Categorical with new categories added or None if inplace.
960
+ cat : Categorical or None
961
+ Categorical with new categories added or None if ``inplace=True``.
961
962
962
963
Raises
963
964
------
@@ -1007,7 +1008,8 @@ def remove_categories(self, removals, inplace=False):
1007
1008
1008
1009
Returns
1009
1010
-------
1010
- cat : Categorical with removed categories or None if inplace.
1011
+ cat : Categorical or None
1012
+ Categorical with removed categories or None if ``inplace=True``.
1011
1013
1012
1014
Raises
1013
1015
------
@@ -1054,7 +1056,8 @@ def remove_unused_categories(self, inplace=False):
1054
1056
1055
1057
Returns
1056
1058
-------
1057
- cat : Categorical with unused categories dropped or None if inplace.
1059
+ cat : Categorical or None
1060
+ Categorical with unused categories dropped or None if ``inplace=True``.
1058
1061
1059
1062
See Also
1060
1063
--------
0 commit comments