каждая строка представляет собой ответ пользователя.
и я хочу заказать его с помощью Python на основе (question_type + length_string) для каждого пользователя id (у меня 20 строк по пользователю), и вот порядок:
Код: Выделить всё
[
{'length_string': 5, 'question_type': 'baseline'},
{'length_string': 15, 'question_type': 'baseline'},
{'length_string': 5, 'question_type': 'baseline'},
{'length_string': 10, 'question_type': 'baseline'},
{'length_string': 15, 'question_type': 'baseline'},
{'length_string': 15, 'question_type': 'baseline'},
{'length_string': 5, 'question_type': 'side_by_side_color'},
{'length_string': 15, 'question_type': 'side_by_side_color'},
{'length_string': 5, 'question_type': 'Top_of_each_color'},
{'length_string': 10, 'question_type': 'Top_of_each_color'},
{'length_string': 15, 'question_type': 'Top_of_each_color'},
{'length_string': 15, 'question_type': 'side_by_side_color'},
{'length_string': 'paragraph', 'question_type': 'side_by_side_baseline'},
{'length_string': 'paragraph', 'question_type': 'side_by_side_color'},
{'length_string': 'paragraph', 'question_type': 'side_by_side_color'},
{'length_string': 10, 'question_type': 'Top_of_each_baseline'},
{'length_string': 10, 'question_type': 'Top_of_each_color'},
{'length_string': 15, 'question_type': 'side_by_side_color'},
{'length_string': 'paragraph', 'question_type': 'side_by_side_baseline'},
{'length_string': 5, 'question_type': 'side_by_side_baseline'}
]
Примечание: если вы можете сделать это, просто используя Excel. Пожалуйста, пришлите мне полученный результат, но мне предпочтительнее использовать его на Python.
Подробнее здесь: https://stackoverflow.com/questions/789 ... ith-python