You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
If I were a user I'd probably go looking for a reset_index function before supplying the set_index function with None, but this probably isn't super pressing.
Another difference is also that the change only happens inplace now, and if we view this issue as there being a problem with
uneven behavior between the two index setters, then that problem no long exists.
Currently if an index or time index is set on a DataTable they can be reset by calling
dt.index = None
ordt.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 existingset_index
andset_time_index
methods to allow a None value which will reset the index, or add newreset_index
andreset_time_index
methods.To be most consistent with pandas, the approach should be to create new
reset_index
andreset_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.
The text was updated successfully, but these errors were encountered: