MultiIndex.sort()

MultiIndex.sort(*args, **kwargs) [source]

MultiIndex.sortlevel()

MultiIndex.sortlevel(level=0, ascending=True, sort_remaining=True) [source] Sort MultiIndex at the requested level. The result will respect the original ordering of the associated factor at that level. Parameters: level : list-like, int or str, default 0 If a string is given, must be a name of the level If list-like must be names or ints of levels. ascending : boolean, default True False to sort in descending order Can also be a list to specify a directed ordering sort_remaining : sort

MultiIndex.slice_indexer()

MultiIndex.slice_indexer(start=None, end=None, step=None, kind=None) [source] For an ordered Index, compute the slice indexer for input labels and step Parameters: start : label, default None If None, defaults to the beginning end : label, default None If None, defaults to the end step : int, default None kind : string, default None Returns: indexer : ndarray or slice Notes This function assumes that the data is sorted, so use at your own peril

MultiIndex.slice_locs()

MultiIndex.slice_locs(start=None, end=None, step=None, kind=None) [source] For an ordered MultiIndex, compute the slice locations for input labels. They can be tuples representing partial levels, e.g. for a MultiIndex with 3 levels, you can pass a single value (corresponding to the first level), or a 1-, 2-, or 3-tuple. Parameters: start : label or tuple, default None If None, defaults to the beginning end : label or tuple If None, defaults to the end step : int or None Slice step ki

MultiIndex.shape

MultiIndex.shape return a tuple of the shape of the underlying data

MultiIndex.shift()

MultiIndex.shift(periods=1, freq=None) [source] Shift Index containing datetime objects by input number of periods and DateOffset Returns: shifted : Index

MultiIndex.size

MultiIndex.size return the number of elements in the underlying data

MultiIndex.set_levels()

MultiIndex.set_levels(levels, level=None, inplace=False, verify_integrity=True) [source] Set new levels on MultiIndex. Defaults to returning new index. Parameters: levels : sequence or list of sequence new level(s) to apply level : int, level name, or sequence of int/level names (default None) level(s) to set (None for all levels) inplace : bool if True, mutates in place verify_integrity : bool (default True) if True, checks that levels and labels are compatible Returns: new inde

MultiIndex.set_names()

MultiIndex.set_names(names, level=None, inplace=False) [source] Set new names on index. Defaults to returning new index. Parameters: names : str or sequence name(s) to set level : int, level name, or sequence of int/level names (default None) If the index is a MultiIndex (hierarchical), level(s) to set (None for all levels). Otherwise level must be None inplace : bool if True, mutates in place Returns: new index (of same type and class...etc) [if inplace, returns None] Examples &g

MultiIndex.set_value()

MultiIndex.set_value(arr, key, value) [source] Fast lookup of value from 1-dimensional ndarray. Only use this if you know what you?re doing