bigframes.pandas.DataFrame.reorder_levels#

DataFrame.reorder_levels(order: Hashable | Sequence[Hashable], axis: int | str = 0)[source]#

Rearrange index levels using input order. May not drop or duplicate levels.

Parameters:
  • order (list of int or list of str) – List representing new level order. Reference level by number (position) or by key (label).

  • axis ({0 or 'index', 1 or 'columns'}, default 0) – Where to reorder levels.

Returns:

DataFrame of rearranged index.

Return type:

bigframes.pandas.DataFrame

Raises:

ValueError – If columns are not multi-index.