Load_dataset for local CSV files
COLLABORATOR
Hi,

this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data):
```python
import ast
# load the dataset and copy the features
def process(ex):
    return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])}
dataset = dataset.map(process, features=new_features)
```

2021-04-29T15:38:15Z
https://github.com/huggingface/datasets/issues/2288#issuecomment-829344644
https://api.github.com/repos/huggingface/datasets/issues/2288
MDEyOklzc3VlQ29tbWVudDgyOTM0NDY0NA==
https://api.github.com/repos/huggingface/datasets/issues/comments/829344644/reactions
2021-04-29T15:38:15Z
https://api.github.com/repos/huggingface/datasets/issues/comments/829344644
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
NONE
Hi,

Thanks for the reply.
I  have already used  ```ast.literal_eval``` to evaluate the string into list, but I was getting another error:
```
ArrowInvalid: Could not convert X with type str: tried to convert to int
```
Why this happens ? Should labels be mapped to their ids and use int instead of str ?
2021-04-29T16:16:14Z
https://github.com/huggingface/datasets/issues/2288#issuecomment-829376796
https://api.github.com/repos/huggingface/datasets/issues/2288
MDEyOklzc3VlQ29tbWVudDgyOTM3Njc5Ng==
https://api.github.com/repos/huggingface/datasets/issues/comments/829376796/reactions
2021-04-29T16:16:44Z
https://api.github.com/repos/huggingface/datasets/issues/comments/829376796
https://avatars.githubusercontent.com/u/17052700?v=4
https://api.github.com/users/sstojanoska/events{/privacy}
https://api.github.com/users/sstojanoska/followers
https://api.github.com/users/sstojanoska/following{/other_user}
https://api.github.com/users/sstojanoska/gists{/gist_id}
https://github.com/sstojanoska
sstojanoska
MDQ6VXNlcjE3MDUyNzAw
https://api.github.com/users/sstojanoska/orgs
https://api.github.com/users/sstojanoska/received_events
https://api.github.com/users/sstojanoska/repos
https://api.github.com/users/sstojanoska/starred{/owner}{/repo}
https://api.github.com/users/sstojanoska/subscriptions
User
https://api.github.com/users/sstojanoska
public
COLLABORATOR
Yes, just map the labels to their ids.
2021-04-29T17:40:03Z
https://github.com/huggingface/datasets/issues/2288#issuecomment-829458876
https://api.github.com/repos/huggingface/datasets/issues/2288
MDEyOklzc3VlQ29tbWVudDgyOTQ1ODg3Ng==
https://api.github.com/repos/huggingface/datasets/issues/comments/829458876/reactions
2021-04-29T17:40:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/829458876
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
The method load_dataset fails to correctly load a dataset from csv. 

Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens  |  labels
['I' , 'am', 'John']  |  ['PRON', 'AUX', 'PROPN' ] 
```
The method, loads each list as a string:  (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value)  and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error 
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ?