QuestionResponse

class inmydata.ConversationalData.QuestionResponse(answer: str, dataFrame: DataFrame, subject: str)

Bases: object

A data class for providing a structured response to a question. This class provides a string and a dataframe property to return a both a string and dataframe in response to a question.

answer

The string response to the question.

Type:

str

dataFrame

The pandas DataFrame containing the structured data in response to the question.

Type:

pd.DataFrame

subject

The subject that was used to generate the answer.

Type:

str

Members

toJSON()

Returns a JSON representation of the QuestionResponse object.

Returns:

A JSON string representation of the QuestionResponse object.

Return type:

str