You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running the code in Microsoft Fabric Notbook
#Generate visualization via a "user query"
user_query = "What is the average price of cars by type?"
textgen_config = TextGenerationConfig(n=1, temperature=0.2, use_cache=True)
charts = lida.visualize(summary=summary, goal=user_query, textgen_config=textgen_config)
charts[0]
importseabornassnsimportpandasaspdimportmatplotlib.pyplotaspltError-----defplot(data: pd.DataFrame):
# solution plan# i. group the data by Type and calculate the mean of Retail_Price# ii. plot the grouped data using a barplotsns.barplot(x='Type', y='Retail_Price', data=data.groupby('Type').mean().reset_index())
plt.title('What is the average price of cars by type?', wrap=True)
returnplt;
chart=plot(data)
I am running the code in Microsoft Fabric Notbook
#Generate visualization via a "user query"
agg function failed [how->mean,dtype->object]
IndexError Traceback (most recent call last)
Cell In[25], line 5
3 textgen_config = TextGenerationConfig(n=1, temperature=0.2, use_cache=True)
4 charts = lida.visualize(summary=summary, goal=user_query, textgen_config=textgen_config)
----> 5 charts[0]
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: