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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support operation on multiple data frames, for example concat, merge, join, append, compare, etc #86

Closed
shuangquanhuang opened this issue May 8, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@shuangquanhuang
Copy link

馃殌 The feature

Support operation on multiple data frames, for example concat, merge, join, append, compare, etc

Motivation, pitch

Support operation on multiple data frames, for example concat, merge, join, append, compare, etc

Alternatives

No response

Additional context

No response

@gventuri gventuri added the enhancement New feature or request label May 8, 2023
@gventuri
Copy link
Collaborator

gventuri commented May 8, 2023

@shuangquanhuang super nice addition, will work on it!

@ambujpawar
Copy link
Contributor

ambujpawar commented May 9, 2023

Hey, @gventuri I can work on it. However, before starting with the issue. I have a few questions:

  • How do you propose to handle this? Because currently the user queries like pandas_ai.run(df, prompt='Which are the 5 happiest countries?')
  • Should it be handle datafranes like pandas_ai.run(df1, df2, prompt='Merge the two databases?')

Or do you have something else in mind?

@gventuri
Copy link
Collaborator

gventuri commented May 9, 2023

@ambujpawar maybe we could also accept a list in the first param and then conditionally run the workflow on only 1 df vs multiple dfs.

Something like this:

pandas_ai.run(df1, prompt='Which are the 5 happiest countries?')
pandas_ai.run([df1, df2], prompt='Which are the 5 happiest countries?')

What do you think?

@ambujpawar
Copy link
Contributor

I dont have a strong preference for any. But out of the these two options, I prefer:

pandas_ai.run(df1, df2, prompt='Which are the 5 happiest countries?')

Because to be it seems to be more "easy" for the user as well as more intuitive. So shall I go ahead with that?

@mzy2240
Copy link

mzy2240 commented May 10, 2023

The current version does not understand groupby-related operation, which might also be good to have. For example, if you add a continent column to the example and ask which countries are happiest in each continent, it will give random answer.

@HenriqueAJNB
Copy link
Contributor

This groupby tasks should be another issue. Can you create that @mzy2240?

@gventuri
Copy link
Collaborator

@mzy2240 @HenriqueAJNB I've created one (#127 )

@gventuri
Copy link
Collaborator

Feature added with this commit: be4c717

Closing

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

No branches or pull requests

5 participants