Conversion to Arrow fails due to wrong type heuristic
COLLABORATOR
Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix. 

JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon. 

Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`
2023-10-23T19:12:28Z
https://github.com/huggingface/datasets/issues/6324#issuecomment-1775862988
https://api.github.com/repos/huggingface/datasets/issues/6324
IC_kwDODunzps5p2YTM
https://api.github.com/repos/huggingface/datasets/issues/comments/1775862988/reactions
2023-10-23T19:12:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1775862988
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
> Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix.
> 
> JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon.
> 
> Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`

Ok many thanks, I was able to mitigate the problem by manually checking and converting all problematic fields now.
2023-10-23T20:52:57Z
https://github.com/huggingface/datasets/issues/6324#issuecomment-1776002444
https://api.github.com/repos/huggingface/datasets/issues/6324
IC_kwDODunzps5p26WM
https://api.github.com/repos/huggingface/datasets/issues/comments/1776002444/reactions
2023-10-23T20:52:57Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1776002444
https://avatars.githubusercontent.com/u/2862336?v=4
https://api.github.com/users/jphme/events{/privacy}
https://api.github.com/users/jphme/followers
https://api.github.com/users/jphme/following{/other_user}
https://api.github.com/users/jphme/gists{/gist_id}
https://github.com/jphme
jphme
MDQ6VXNlcjI4NjIzMzY=
https://api.github.com/users/jphme/orgs
https://api.github.com/users/jphme/received_events
https://api.github.com/users/jphme/repos
https://api.github.com/users/jphme/starred{/owner}{/repo}
https://api.github.com/users/jphme/subscriptions
User
https://api.github.com/users/jphme
public
### Describe the bug

I have a list of dictionaries with valid/JSON-serializable values. 

One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on.

If trying to convert this list to a dataset with `Dataset.from_list()`, I always get
`ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers.

Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation.

### Steps to reproduce the bug

* create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset.


### Expected behavior

There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion).

### Environment info

- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35
- Python version: 3.9.18
- Huggingface_hub version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.1