Series.clip_upper()

Series.clip_upper(threshold, axis=None) [source] Return copy of input with values above given value(s) truncated. Parameters: threshold : float or array_like axis : int or string axis name, optional Align object with threshold along the given axis. Returns: clipped : same type as input See also clip

Series.clip_lower()

Series.clip_lower(threshold, axis=None) [source] Return copy of the input with values below given value(s) truncated. Parameters: threshold : float or array_like axis : int or string axis name, optional Align object with threshold along the given axis. Returns: clipped : same type as input See also clip

Series.clip()

Series.clip(lower=None, upper=None, axis=None, *args, **kwargs) [source] Trim values at input threshold(s). Parameters: lower : float or array_like, default None upper : float or array_like, default None axis : int or string axis name, optional Align object with lower and upper along the given axis. Returns: clipped : Series Examples >>> df 0 1 0 0.335232 -1.256177 1 -1.367855 0.746646 2 0.027753 -1.176076 3 0.230930 -0.679613 4 1.261967 0.570967 >>>

Series.cat.set_categories()

Series.cat.set_categories(*args, **kwargs) [source] Sets the categories to the specified new_categories. new_categories can include new categories (which will result in unused categories) or remove old categories (which results in values set to NaN). If rename==True, the categories will simple be renamed (less or more items than in old categories will result in values set to NaN or in unused categories respectively). This method can be used to perform more than one action of adding, removin

Series.cat.reorder_categories()

Series.cat.reorder_categories(*args, **kwargs) [source] Reorders categories as specified in new_categories. new_categories need to include all old categories and no new category items. Parameters: new_categories : Index-like The categories in new order. ordered : boolean, optional Whether or not the categorical is treated as a ordered categorical. If not given, do not change the ordered information. inplace : boolean (default: False) Whether or not to reorder the categories inplace or

Series.cat.rename_categories()

Series.cat.rename_categories(*args, **kwargs) [source] Renames categories. The new categories has to be a list-like object. All items must be unique and the number of items in the new categories must be the same as the number of items in the old categories. Parameters: new_categories : Index-like The renamed categories. inplace : boolean (default: False) Whether or not to rename the categories inplace or return a copy of this categorical with renamed categories. Returns: cat : Catego

Series.cat.remove_unused_categories()

Series.cat.remove_unused_categories(*args, **kwargs) [source] Removes categories which are not used. Parameters: inplace : boolean (default: False) Whether or not to drop unused categories inplace or return a copy of this categorical with unused categories dropped. Returns: cat : Categorical with unused categories dropped or None if inplace. See also rename_categories, reorder_categories, add_categories, remove_categories, set_categories

Series.cat.remove_categories()

Series.cat.remove_categories(*args, **kwargs) [source] Removes the specified categories. removals must be included in the old categories. Values which were in the removed categories will be set to NaN Parameters: removals : category or list of categories The categories which should be removed. inplace : boolean (default: False) Whether or not to remove the categories inplace or return a copy of this categorical with removed categories. Returns: cat : Categorical with removed categori

Series.cat.ordered

Series.cat.ordered Gets the ordered attribute

Series.cat.codes

Series.cat.codes