Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of error when runing from sample notebook #109

Open
nssidhu opened this issue Apr 6, 2024 · 0 comments
Open

Lots of error when runing from sample notebook #109

nssidhu opened this issue Apr 6, 2024 · 0 comments

Comments

@nssidhu
Copy link

nssidhu commented Apr 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant