alteryx / alteryx/woodwork

Provide ability to reset index and time index on DataTable via method call

Open
#213 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
155
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.