Tilde (~) is not supported for data_files
MEMBER
Hi @exs-avianello, is it really needed? Note you can alternatively use `pathlib.Path` among others as it follows:

```python
import datasets
from pathlib import Path

# save a parquet file at ~/path/to/data.parquet

data_files = Path.home() / "path/to/data.parquet"
dataset = datasets.load_dataset("parquet", data_files=data_files)
```
2023-09-05T08:00:16Z
https://github.com/huggingface/datasets/issues/6212#issuecomment-1706132090
https://api.github.com/repos/huggingface/datasets/issues/6212
IC_kwDODunzps5lsYJ6
https://api.github.com/repos/huggingface/datasets/issues/comments/1706132090/reactions
2023-09-05T08:00:16Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1706132090
https://avatars.githubusercontent.com/u/36760800?v=4
https://api.github.com/users/alvarobartt/events{/privacy}
https://api.github.com/users/alvarobartt/followers
https://api.github.com/users/alvarobartt/following{/other_user}
https://api.github.com/users/alvarobartt/gists{/gist_id}
https://github.com/alvarobartt
alvarobartt
MDQ6VXNlcjM2NzYwODAw
https://api.github.com/users/alvarobartt/orgs
https://api.github.com/users/alvarobartt/received_events
https://api.github.com/users/alvarobartt/repos
https://api.github.com/users/alvarobartt/starred{/owner}{/repo}
https://api.github.com/users/alvarobartt/subscriptions
User
https://api.github.com/users/alvarobartt
public
NONE
Hi @alvarobartt ! 

This is definitely just a "nice to have" and I am personally more than happy to just use absolute paths client-side. I just wanted to flag it up in case it can help improve the package even more 🙌 It might not be immediately obvious from the stack trace that the error is triggered by the `~` in the path
2023-09-05T08:28:39Z
https://github.com/huggingface/datasets/issues/6212#issuecomment-1706171875
https://api.github.com/repos/huggingface/datasets/issues/6212
IC_kwDODunzps5lsh3j
https://api.github.com/repos/huggingface/datasets/issues/comments/1706171875/reactions
2023-09-05T08:28:39Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1706171875
https://avatars.githubusercontent.com/u/128361578?v=4
https://api.github.com/users/exs-avianello/events{/privacy}
https://api.github.com/users/exs-avianello/followers
https://api.github.com/users/exs-avianello/following{/other_user}
https://api.github.com/users/exs-avianello/gists{/gist_id}
https://github.com/exs-avianello
exs-avianello
U_kgDOB6akag
https://api.github.com/users/exs-avianello/orgs
https://api.github.com/users/exs-avianello/received_events
https://api.github.com/users/exs-avianello/repos
https://api.github.com/users/exs-avianello/starred{/owner}{/repo}
https://api.github.com/users/exs-avianello/subscriptions
User
https://api.github.com/users/exs-avianello
public
### Describe the bug

Attempting to `load_dataset` from a path starting with `~` (as a shorthand for the user's home directory) seems not to be fully working - at least as far as the `parquet` dataset builder is concerned.

(the same file can be loaded correctly if providing its absolute path instead)

I think that this is very similar to https://github.com/huggingface/datasets/issues/5757, but for `data_files` rather than `data_dir`

### Steps to reproduce the bug

```python
import datasets

# save a parquet file at ~/path/to/data.parquet

data_files = "~/path/to/data.parquet"
dataset = datasets.load_dataset("parquet", data_files=data_files)
```
```
Downloading data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 12671.61it/s]
Extracting data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 22671.91it/s]
Generating train split: 0 examples [00:00, ? examples/s]
Traceback (most recent call last):
  File ".venv/lib/python3.11/site-packages/datasets/builder.py", line 1949, in _prepare_split_single
    num_examples, num_bytes = writer.finalize()
                              ^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/site-packages/datasets/arrow_writer.py", line 598, in finalize
    raise SchemaInferenceError("Please pass `features` or at least one example when writing data")
datasets.arrow_writer.SchemaInferenceError: Please pass `features` or at least one example when writing data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".venv/lib/python3.11/site-packages/datasets/load.py", line 2133, in load_dataset
    builder_instance.download_and_prepare(
  File ".venv/lib/python3.11/site-packages/datasets/builder.py", line 954, in download_and_prepare
    self._download_and_prepare(
  File ".venv/lib/python3.11/site-packages/datasets/builder.py", line 1049, in _download_and_prepare
    self._prepare_split(split_generator, **prepare_split_kwargs)
  File ".venv/lib/python3.11/site-packages/datasets/builder.py", line 1813, in _prepare_split
    for job_id, done, content in self._prepare_split_single(
  File ".venv/lib/python3.11/site-packages/datasets/builder.py", line 1958, in _prepare_split_single
    raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset

```

### Expected behavior

Can use `~` shorthand in paths when loading local (parquet) datasets.

### Environment info

`datasets                               2.14.3`
