Reset the index to the default index. Note that unlike in ``pandas``, the reset index for a Dask DataFrame will not be monotonically increasing from 0. Instead, it will restart at 0 for each partition (e.g. ``index1 = [0, ..., 10], index2 = [0, ...]``). This is due t
(self, drop: bool = False)
| 691 | self._expr = _expr |
| 692 | |
| 693 | def reset_index(self, drop: bool = False): |
| 694 | """Reset the index to the default index. |
| 695 | |
| 696 | Note that unlike in ``pandas``, the reset index for a Dask DataFrame will |
| 697 | not be monotonically increasing from 0. Instead, it will restart at 0 |
| 698 | for each partition (e.g. ``index1 = [0, ..., 10], index2 = [0, ...]``). |
| 699 | This is due to the inability to statically know the full length of the |
| 700 | index. |
| 701 | |
| 702 | For DataFrame with multi-level index, returns a new DataFrame with |
| 703 | labeling information in the columns under the index names, defaulting |
| 704 | to 'level_0', 'level_1', etc. if any are None. For a standard index, |
| 705 | the index name will be used (if set), otherwise a default 'index' or |
| 706 | 'level_0' (if 'index' is already taken) will be used. |
| 707 | |
| 708 | Parameters |
| 709 | ---------- |
| 710 | drop : boolean, default False |
| 711 | Do not try to insert index into dataframe columns. |
| 712 | """ |
| 713 | return new_collection(expr.ResetIndex(self, drop)) |
| 714 | |
| 715 | def head(self, n: int = 5, npartitions=1, compute: bool = True): |
| 716 | """First n rows of the dataset |