Error with sklearn train_test_split
MEMBER
Indeed. Probably we will want to have a similar method directly in the library
2020-05-17T12:32:09Z
https://github.com/huggingface/datasets/issues/147#issuecomment-629789586
https://api.github.com/repos/huggingface/datasets/issues/147
MDEyOklzc3VlQ29tbWVudDYyOTc4OTU4Ng==
https://api.github.com/repos/huggingface/datasets/issues/comments/629789586/reactions
2020-05-17T12:32:09Z
https://api.github.com/repos/huggingface/datasets/issues/comments/629789586
https://avatars.githubusercontent.com/u/7353373?v=4
https://api.github.com/users/thomwolf/events{/privacy}
https://api.github.com/users/thomwolf/followers
https://api.github.com/users/thomwolf/following{/other_user}
https://api.github.com/users/thomwolf/gists{/gist_id}
https://github.com/thomwolf
thomwolf
MDQ6VXNlcjczNTMzNzM=
https://api.github.com/users/thomwolf/orgs
https://api.github.com/users/thomwolf/received_events
https://api.github.com/users/thomwolf/repos
https://api.github.com/users/thomwolf/starred{/owner}{/repo}
https://api.github.com/users/thomwolf/subscriptions
User
https://api.github.com/users/thomwolf
public
NONE
Related: #166 
2020-05-23T14:23:12Z
https://github.com/huggingface/datasets/issues/147#issuecomment-633063610
https://api.github.com/repos/huggingface/datasets/issues/147
MDEyOklzc3VlQ29tbWVudDYzMzA2MzYxMA==
https://api.github.com/repos/huggingface/datasets/issues/comments/633063610/reactions
2020-05-23T14:23:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/633063610
https://avatars.githubusercontent.com/u/18640507?v=4
https://api.github.com/users/KappaDistributive/events{/privacy}
https://api.github.com/users/KappaDistributive/followers
https://api.github.com/users/KappaDistributive/following{/other_user}
https://api.github.com/users/KappaDistributive/gists{/gist_id}
https://github.com/KappaDistributive
KappaDistributive
MDQ6VXNlcjE4NjQwNTA3
https://api.github.com/users/KappaDistributive/orgs
https://api.github.com/users/KappaDistributive/received_events
https://api.github.com/users/KappaDistributive/repos
https://api.github.com/users/KappaDistributive/starred{/owner}{/repo}
https://api.github.com/users/KappaDistributive/subscriptions
User
https://api.github.com/users/KappaDistributive
public
It would be nice if we could use sklearn `train_test_split` to quickly generate subsets from the dataset objects returned by `nlp.load_dataset`. At the moment the code:

```python
data = nlp.load_dataset('imdb', cache_dir=data_cache)
f_half, s_half = train_test_split(data['train'], test_size=0.5, random_state=seed)
```
throws:
```
ValueError: Can only get row(s) (int or slice) or columns (string).
```
It's not a big deal, since there are other ways to split the data, but it would be a cool thing to have.