[Feature request] Add a feature to dataset
MEMBER
Do you have an example of what you would like to do? (you can just add a field in the output of the unction you give to map and this will add this field in the output table)
2020-06-09T16:40:21Z
https://github.com/huggingface/datasets/issues/256#issuecomment-641424431
https://api.github.com/repos/huggingface/datasets/issues/256
MDEyOklzc3VlQ29tbWVudDY0MTQyNDQzMQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/641424431/reactions
2020-06-09T16:40:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/641424431
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
Given another source of data loaded in, I want to pre-add it to the dataset so that it aligns with the indices of the arrow dataset prior to performing map.

E.g. 
```
new_info = list of length dataset['train']

dataset['train'] = dataset['train'].map(lambda x: some_function(x, new_info[index of x]))

def some_function(x, new_info_x):
    # adds new_info[index of x] as a field to x
    x['new_info'] = new_info_x
    return x
```
I was thinking to instead create a new field in the arrow dataset so that instance x contains all the necessary information when map function is applied (since I don't have index information to pass to map function).
2020-06-09T16:46:39Z
https://github.com/huggingface/datasets/issues/256#issuecomment-641431982
https://api.github.com/repos/huggingface/datasets/issues/256
MDEyOklzc3VlQ29tbWVudDY0MTQzMTk4Mg==
https://api.github.com/repos/huggingface/datasets/issues/comments/641431982/reactions
2020-06-09T16:46:39Z
https://api.github.com/repos/huggingface/datasets/issues/comments/641431982
https://avatars.githubusercontent.com/u/8027676?v=4
https://api.github.com/users/sarahwie/events{/privacy}
https://api.github.com/users/sarahwie/followers
https://api.github.com/users/sarahwie/following{/other_user}
https://api.github.com/users/sarahwie/gists{/gist_id}
https://github.com/sarahwie
sarahwie
MDQ6VXNlcjgwMjc2NzY=
https://api.github.com/users/sarahwie/orgs
https://api.github.com/users/sarahwie/received_events
https://api.github.com/users/sarahwie/repos
https://api.github.com/users/sarahwie/starred{/owner}{/repo}
https://api.github.com/users/sarahwie/subscriptions
User
https://api.github.com/users/sarahwie
public
NONE
This is what I have so far: 

```
import pyarrow as pa
from nlp.arrow_dataset import Dataset

aug_dataset = dataset['train'][:]
aug_dataset['new_info'] = new_info

#reformat as arrow-table
schema = dataset['train'].schema

# this line doesn't work:
schema.append(pa.field('new_info', pa.int32()))

table = pa.Table.from_pydict(
    aug_dataset,
    schema=schema
)
dataset['train'] = Dataset(table) 
```
2020-06-09T16:49:13Z
https://github.com/huggingface/datasets/issues/256#issuecomment-641434800
https://api.github.com/repos/huggingface/datasets/issues/256
MDEyOklzc3VlQ29tbWVudDY0MTQzNDgwMA==
https://api.github.com/repos/huggingface/datasets/issues/comments/641434800/reactions
2020-06-09T16:49:13Z
https://api.github.com/repos/huggingface/datasets/issues/comments/641434800
https://avatars.githubusercontent.com/u/8027676?v=4
https://api.github.com/users/sarahwie/events{/privacy}
https://api.github.com/users/sarahwie/followers
https://api.github.com/users/sarahwie/following{/other_user}
https://api.github.com/users/sarahwie/gists{/gist_id}
https://github.com/sarahwie
sarahwie
MDQ6VXNlcjgwMjc2NzY=
https://api.github.com/users/sarahwie/orgs
https://api.github.com/users/sarahwie/received_events
https://api.github.com/users/sarahwie/repos
https://api.github.com/users/sarahwie/starred{/owner}{/repo}
https://api.github.com/users/sarahwie/subscriptions
User
https://api.github.com/users/sarahwie
public
MEMBER
Maybe you can use `with_indices`?

```python
new_info = list of length dataset['train']

def some_function(indice, x):
    # adds new_info[index of x] as a field to x
    x['new_info'] = new_info_x[indice]
    return x

dataset['train'] = dataset['train'].map(some_function, with_indices=True)
```
2020-06-09T16:51:05Z
https://github.com/huggingface/datasets/issues/256#issuecomment-641437053
https://api.github.com/repos/huggingface/datasets/issues/256
MDEyOklzc3VlQ29tbWVudDY0MTQzNzA1Mw==
https://api.github.com/repos/huggingface/datasets/issues/comments/641437053/reactions
2020-06-09T16:51:05Z
https://api.github.com/repos/huggingface/datasets/issues/comments/641437053
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
Oh great. That should work. I missed that in the documentation- thanks :) 
2020-06-09T16:51:42Z
https://github.com/huggingface/datasets/issues/256#issuecomment-641437826
https://api.github.com/repos/huggingface/datasets/issues/256
MDEyOklzc3VlQ29tbWVudDY0MTQzNzgyNg==
https://api.github.com/repos/huggingface/datasets/issues/comments/641437826/reactions
2020-06-09T16:51:42Z
https://api.github.com/repos/huggingface/datasets/issues/comments/641437826
https://avatars.githubusercontent.com/u/8027676?v=4
https://api.github.com/users/sarahwie/events{/privacy}
https://api.github.com/users/sarahwie/followers
https://api.github.com/users/sarahwie/following{/other_user}
https://api.github.com/users/sarahwie/gists{/gist_id}
https://github.com/sarahwie
sarahwie
MDQ6VXNlcjgwMjc2NzY=
https://api.github.com/users/sarahwie/orgs
https://api.github.com/users/sarahwie/received_events
https://api.github.com/users/sarahwie/repos
https://api.github.com/users/sarahwie/starred{/owner}{/repo}
https://api.github.com/users/sarahwie/subscriptions
User
https://api.github.com/users/sarahwie
public
Is there a straightforward way to add a field to the arrow_dataset, prior to performing map?