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

Not able to transpose table #3

Open
shantanuo opened this issue Jan 30, 2023 · 2 comments
Open

Not able to transpose table #3

shantanuo opened this issue Jan 30, 2023 · 2 comments

Comments

@shantanuo
Copy link

Great work. But when I tried to "transpose table" it did not get it. Then I tried...

sloth.query("columns in rows and rows in columns", show_query=True)

SELECT *
FROM (
  SELECT *
  FROM T
  LIMIT 10
)
PIVOT (
  COUNT(*)
  FOR column_name
  IN ('a', 'b', 'c')
)

Unsuccessful. Try rephrasing your query, or add additional table descriptions in df.sloth.description.
You can inspect the generated prompt and GPT response in sloth.show_last_prompt().

sloth.show_last_prompt is not working by the way.

@shantanuo
Copy link
Author

After upgrading the package to use model "text-davinci-003" (instead of version 002) I get this query:

SELECT *
FROM df
PIVOT (
  COUNT(*)
  FOR b IN ('e', 'h')
)

But that is not working as well.

@ibestvina
Copy link
Owner

Thanks for the info :) Seems like this might be a bit out of scope for Datasloth. In general, it is aimed more at answering "real" questions, instead of doing data transformations. But I will keep this in mind when making improvements.

Re. show_last_prompt, I will fix that, thanks!

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

2 participants