datasets icon indicating copy to clipboard operation
datasets copied to clipboard

add_column should preserve _indexes

Open cceyda opened this issue 2 years ago • 1 comments

https://github.com/huggingface/datasets/issues/3769#issuecomment-1167146126

doing .add_column("x",x_data) also removed any _indexes on the dataset, decided this shouldn't be the case.

This was because add_column was creating a new Dataset(...) and wasn't possible to pass indexes on init. with this PR now can pass 'indexes' on init through IndexableMixin

  • [x] Added test

cceyda avatar Jun 27 '22 22:06 cceyda

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.