Closed as not planned
Description
I have a question:
What is the average, minimum, and maximum age for all French singers?
and I use the following code
response = agent.chat(question)
print(response)
print(agent.last_code_executed)
and the output is
The average age of French singers is 34.5. The minimum age is 25, and the maximum age is 43.
french_singers = dfs[0][dfs[0]['Country'] == 'France']
average_age = french_singers['Age'].mean()
min_age = french_singers['Age'].min()
max_age = french_singers['Age'].max()
result = {'type': 'string', 'value': f'The average age of French singers is {average_age}. The minimum age is {min_age}, and the maximum age is {max_age}.'}
I don't want this kind of result output, I need the output to be a list, like[{average_age}, {min_age}, {max_age}]. I don't need to include the extra string.
How can I modify the response of pandasai?
Activity