Create dataset from list of dicts
MEMBER
Hi @sanderland, thanks for your enhancement proposal.

I agree with you that this would be useful.

Please note that under the hood, we use PyArrow tables as backend:
- The implementation  of `Dataset.from_dict` uses the PyArrow `Table.from_pydict`

Therefore, I would suggest:
- Implementing `Dataset.from_list` using the PyArrow `Table.from_pylist`

What do you think?
Let's see if other people have other suggestions...
2022-08-25T05:13:56Z
https://github.com/huggingface/datasets/issues/4885#issuecomment-1226784501
https://api.github.com/repos/huggingface/datasets/issues/4885
IC_kwDODunzps5JHz71
https://api.github.com/repos/huggingface/datasets/issues/comments/1226784501/reactions
2022-08-25T05:13:56Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1226784501
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
CONTRIBUTOR
Thanks for the quick and positive reply @albertvillanova! 
`from_list` seems sensible. Have opened a PR so we can discuss details there.
2022-08-25T09:22:54Z
https://github.com/huggingface/datasets/issues/4885#issuecomment-1227008625
https://api.github.com/repos/huggingface/datasets/issues/4885
IC_kwDODunzps5JIqpx
https://api.github.com/repos/huggingface/datasets/issues/comments/1227008625/reactions
2022-08-25T09:22:54Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1227008625
https://avatars.githubusercontent.com/u/48946947?v=4
https://api.github.com/users/sanderland/events{/privacy}
https://api.github.com/users/sanderland/followers
https://api.github.com/users/sanderland/following{/other_user}
https://api.github.com/users/sanderland/gists{/gist_id}
https://github.com/sanderland
sanderland
MDQ6VXNlcjQ4OTQ2OTQ3
https://api.github.com/users/sanderland/orgs
https://api.github.com/users/sanderland/received_events
https://api.github.com/users/sanderland/repos
https://api.github.com/users/sanderland/starred{/owner}{/repo}
https://api.github.com/users/sanderland/subscriptions
User
https://api.github.com/users/sanderland
public
COLLABORATOR
Resolved via #4890.
2022-09-08T16:02:49Z
https://github.com/huggingface/datasets/issues/4885#issuecomment-1240918205
https://api.github.com/repos/huggingface/datasets/issues/4885
IC_kwDODunzps5J9ui9
https://api.github.com/repos/huggingface/datasets/issues/comments/1240918205/reactions
2022-09-08T16:02:49Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1240918205
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
I often find myself with data from a variety of sources, and a list of dicts is very common among these.
However, converting this to a Dataset is a little awkward, requiring either

```Dataset.from_pandas(pd.DataFrame(formatted_training_data))```
Which can error out on some more exotic values as 2-d arrays for reasons that are not entirely clear
> ArrowInvalid: ('Can only convert 1-dimensional array values', 'Conversion failed for column labels with type object')

Alternatively:
```Dataset.from_dict({k: [s[k] for s in formatted_training_data] for k in  formatted_training_data[0].keys()})```
Which works, but is a little ugly.

**Describe the solution you'd like**
Either `.from_dict` accepting a list of dicts, or a `.from_records` function accepting such.

I am happy to PR this, just wanted to check you are happy to accept this I haven't missed something obvious, and which of the solutions would be prefered.
