lida icon indicating copy to clipboard operation
lida copied to clipboard

Lots of error when runing from sample notebook

Open nssidhu opened this issue 10 months ago • 2 comments

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]
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt

Error-----
def plot(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 barplot
    sns.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)
    return plt;

chart = plot(data)

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

nssidhu avatar Apr 06 '24 01:04 nssidhu

same error anyone help ?

aryan757 avatar Jul 18 '24 10:07 aryan757

IndexError: list index out of range

aryan757 avatar Jul 18 '24 10:07 aryan757