From 7815b7259d618051e426db6c3192a374ddc60c74 Mon Sep 17 00:00:00 2001 From: Ben Burtenshaw Date: Wed, 3 Jul 2024 11:21:15 +0200 Subject: [PATCH] docs: update docs for flatten --- argilla/src/argilla/records/_dataset_records.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/argilla/src/argilla/records/_dataset_records.py b/argilla/src/argilla/records/_dataset_records.py index e6a641650d..2d1c351e68 100644 --- a/argilla/src/argilla/records/_dataset_records.py +++ b/argilla/src/argilla/records/_dataset_records.py @@ -305,8 +305,9 @@ def to_list(self, flatten: bool = False) -> List[Dict[str, Any]]: Return the records as a list of dictionaries. This is a convenient shortcut for dataset.records(...).to_list(). Parameters: - flatten (bool): Whether to flatten the dictionary and use dot notation for nested keys like suggestions and responses. - + flatten (bool): The structure of the exported dictionaries in the list. + - True: The record keys are flattened and a dot notation is used to record attributes and their attributes . For example, `label.suggestion` and `label.response`. Records responses are spread across multiple columns for values and users. + - False: The record fields, metadata, suggestions and responses will be nested dictionary with keys for record attributes. Returns: A list of dictionaries of records. """