def set_ordered(self, value, inplace=False):
    '\n        Sets the ordered attribute to the boolean value\n\n        Parameters\n        ----------\n        value : boolean to set whether this categorical is ordered (True) or\n           not (False)\n        inplace : boolean (default: False)\n           Whether or not to set the ordered attribute inplace or return a copy\n           of this categorical with ordered set to the value\n        '
    inplace = validate_bool_kwarg(inplace, 'inplace')
    new_dtype = CategoricalDtype(self.categories, ordered=value)
    cat = (self if inplace else self.copy())
    cat._dtype = new_dtype
    if (not inplace):
        return cat
Sets the ordered attribute to the boolean value

Parameters
----------
value : boolean to set whether this categorical is ordered (True) or
   not (False)
inplace : boolean (default: False)
   Whether or not to set the ordered attribute inplace or return a copy
   of this categorical with ordered set to the value
def set_ordered(self, value, inplace=False):
    '\n        Sets the ordered attribute to the boolean value\n\n        Parameters\n        ----------\n        value : boolean to set whether this categorical is ordered (True) or\n           not (False)\n        inplace : boolean (default: False)\n           Whether or not to set the ordered attribute inplace or return a copy\n           of this categorical with ordered set to the value\n        '
    inplace = validate_bool_kwarg(inplace, 'inplace')
    new_dtype = CategoricalDtype(self.categories, ordered=value)
    cat = (self if inplace else self.copy())
    cat._dtype = new_dtype
    if (not inplace):
        return cat