langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Add Multi-CSV/DF support in CSV and DataFrame Toolkits

Open NickL77 opened this issue 2 years ago • 1 comments

Add Multi-CSV/DF support in CSV and DataFrame Toolkits

  • CSV and DataFrame toolkits now accept list of CSVs/DFs
  • Add default prompts for many dataframes in pandas_dataframe toolkit

Fixes #1958 Potentially fixes #4423

Testing

  • Add single and multi-dataframe integration tests for pandas_dataframe toolkit with permutations of include_df_in_prompt
  • Add single and multi-CSV integration tests for csv toolkit

Who can review?

Community members can review the PR once tests pass. Tag maintainers/contributors who might be interested: @hwchase17 (worked on these toolkits)

NickL77 avatar May 20 '23 01:05 NickL77

Made the stricter typing fix.

Added an example to the existing notebooks. lmk if there's anything else to change.

NickL77 avatar May 23 '23 02:05 NickL77

Is this just waiting for a maintainer to merge? Also if this change makes it to twitter, would appreciate a s/o nicholasliu77 :smile:

NickL77 avatar May 24 '23 06:05 NickL77

thanks @NickL77!

dev2049 avatar May 25 '23 21:05 dev2049

Hi does multi csv or multi df passing through a list does not work with AgentType ZERO SHOT REACT DESCRIPTION? I've been trying a lot to pass a path to csv files through a list or passing df objects as mentioned in the documentation, but it constantly results in 'I need to download the data', seems it cannot read it. It can read it when passed as single string or single df object. I am using latest langchain package 0.0.275. Any help would be appreciated

mrugank-wadekar avatar Aug 29 '23 15:08 mrugank-wadekar