Answers

Answers class

This module contains the Answers class, which is a helper class to hold the answers to a survey.

class edsl.jobs.Answers.Answers(dict=None, /, **kwargs)[source]

Bases: UserDict

Helper class to hold the answers to a survey.

add_answer(response: EDSLResultObjectInput, question: QuestionBase) None[source]

Add a response to the answers dictionary.

classmethod from_dict(d)[source]

Return an Answers object from a dictionary.

replace_missing_answers_with_none(survey) None[source]

Replace missing answers with None. Answers can be missing if the agent skips a question.

rich_print()[source]

Display an object as a table.

to_dict()[source]

Return a dictionary of the answers.