From ef3d3f10886e23a65cce3bfd939b8ec0d5a5c2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20=C5=A0a=C5=A1ko?= Date: Mon, 24 Jul 2023 16:34:43 +0200 Subject: [PATCH] Improve `Dataset.from_list` docstring (#6062) --- src/datasets/arrow_dataset.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/datasets/arrow_dataset.py b/src/datasets/arrow_dataset.py index 250184e7312..7c4729f6e77 100644 --- a/src/datasets/arrow_dataset.py +++ b/src/datasets/arrow_dataset.py @@ -932,19 +932,19 @@ def from_list( split: Optional[NamedSplit] = None, ) -> "Dataset": """ - Convert a list of dicts to a `pyarrow.Table` to create a :class:`Dataset`. + Convert a list of dicts to a `pyarrow.Table` to create a [`Dataset`]`. Note that the keys of the first entry will be used to determine the dataset columns, regardless of what is passed to features. Args: mapping (`List[dict]`): A list of mappings of strings to row values. - features (:class:`Features`, optional): Dataset features. - info (:class:`DatasetInfo`, optional): Dataset information, like description, citation, etc. - split (:class:`NamedSplit`, optional): Name of the dataset split. + features (`Features`, optional): Dataset features. + info (`DatasetInfo`, optional): Dataset information, like description, citation, etc. + split (`NamedSplit`, optional): Name of the dataset split. Returns: - :class:`Dataset` + [`Dataset`] """ # for simplicity and consistency wrt OptimizedTypedSequence we do not use InMemoryTable.from_pylist here mapping = {k: [r.get(k) for r in mapping] for k in mapping[0]} if mapping else {}