Map function: Type error on iter #999
{'login': 'josephkready666', 'id': 52659318, 'node_id': 'MDQ6VXNlcjUyNjU5MzE4', 'avatar_url': 'https://avatars.githubusercontent.com/u/52659318?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/josephkready666', 'html_url': 'https://github.com/josephkready666', 'followers_url': 'https://api.github.com/users/josephkready666/followers', 'following_url': 'https://api.github.com/users/josephkready666/following{/other_user}', 'gists_url': 'https://api.github.com/users/josephkready666/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/josephkready666/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/josephkready666/subscriptions', 'organizations_url': 'https://api.github.com/users/josephkready666/orgs', 'repos_url': 'https://api.github.com/users/josephkready666/repos', 'events_url': 'https://api.github.com/users/josephkready666/events{/privacy}', 'received_events_url': 'https://api.github.com/users/josephkready666/received_events', 'type': 'User', 'site_admin': False}
[{'id': 1935892857, 'node_id': 'MDU6TGFiZWwxOTM1ODkyODU3', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/bug', 'name': 'bug', 'color': 'd73a4a', 'default': True, 'description': "Something isn't working"}]
[]
['Hi, thanks for reporting.\r\n\r\nIt would be really helpful if you could provide the actual code of the `text_numbers_to_int` function so we can reproduce the error.'
 '```\r\ndef text_numbers_to_int(text, column=""):\r\n    """\r\n    Convert text numbers to int.\r\n\r\n    :param text: text numbers\r\n    :return: int\r\n    """\r\n    try:\r\n        numbers = find_numbers(text)\r\n        if not numbers:\r\n            return text\r\n        result = ""\r\n        i, j = 0, 0\r\n        while i < len(text):\r\n            if j < len(numbers) and i == numbers[j][1]:\r\n                n = int(numbers[j][0]) if numbers[j][0] % 1 == 0 else float(numbers[j][0])\r\n                result += str(n)\r\n                i = numbers[j][2] #end\r\n                j += 1\r\n            else:\r\n                result += text[i]\r\n                i += 1\r\n        if column:\r\n            return{column: result}\r\n        else:\r\n            return {column: result}\r\n    except Exception as e:\r\n        print(e)\r\n        return {column: result}\r\n```'
 'Maybe this is because of the `return text` line ? I think it should return a dictionary rather than a string'
 'Yes that was it, good catch! Thanks']
## Describe the bug
Using the map function, it throws a type error on iter #999

Here is the code I am calling:
```
dataset = datasets.load_dataset('squad')
dataset['validation'].map(text_numbers_to_int, input_columns=['context'], fn_kwargs={'column': 'context'})
``` 
text_numbers_to_int returns the input text with numbers replaced in the format {'context': text}

It happens at 
`
File "C:\Users\lonek\anaconda3\envs\ai\Lib\site-packages\datasets\arrow_writer.py", line 289, in <listcomp>
    [row[0][col] for row in self.current_examples], type=col_type, try_type=col_try_type, col=col
`

The issue is that the list comprehension expects self.current_examples to be type tuple(dict, str), but for some reason 26 out of 1000 of the sefl.current_examples are type tuple(str, str)

Here is an example of what self.current_examples should be
({'context': 'Super Bowl 50 was an...merals 50.'}, '')

Here is an example of what self.current_examples are when it throws the error:
('The Panthers used th... Marriott.', '')

{'url': 'https://api.github.com/repos/huggingface/datasets/issues/3329/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}