Provide ability to reset index and time index on DataTable via method call
- Vorherrschende Sprache
- Python
- Sterne
- 155
- Forks
- 24
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Currently if an index or time index is set on a DataTable they can be reset by calling `dt.index = None` or `dt.time_index = None`. However, this modifies the existing DataTable in place.
If we attempt to call `dt.set_index(None)` to reset the index, an error is raised. We should either update the existing `set_index` and `set_time_index` methods to allow a None value which will reset the index, or add new `reset_index` and `reset_time_index` methods.
To be most consistent with pandas, the approach should be to create new `reset_index` and `reset_time_index` methods on DataTable which return a new DataTable object with the index cleared.
New tests should also be added to test these methods.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.