Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsAINetworkAirbyte Question AnsweringAmadeusAzure Cognitive ServicesClickUp Langchain ToolkitCSVDocument ComparisonGithubGitlabGmailGoogle Drive toolJiraJSONMultiOnOffice365OpenAPINatural Language APIsPandas DataframePlayWright BrowserPowerBI DatasetPythonSpark DataframeSpark SQLSQL DatabaseVectorstoreXorbitsMemoryCallbacksChat loadersComponentsAgents and toolkitsXorbitsOn this pageXorbitsThis notebook shows how to use agents to interact with Xorbits Pandas dataframe and Xorbits Numpy ndarray. It is mostly optimized for question answering.NOTE: this agent calls the Python agent under the hood, which executes LLM generated Python code - this can be bad if the LLM generated Python code is harmful. Use cautiously.Pandas examples‚Äãimport xorbits.pandas as pdfrom langchain.agents import create_xorbits_agentfrom langchain.llms import OpenAIdata = pd.read_csv("titanic.csv")agent = create_xorbits_agent(OpenAI(temperature=0), data, verbose=True)      0%|          |   0.00/100 [00:00<?, ?it/s]agent.run("How many rows and columns are there?")            > Entering new  chain...    Thought: I need to count the number of rows and columns    Action: python_repl_ast    Action Input: data.shape    Observation: (891, 12)    Thought: I now know the final answer    Final Answer: There are 891 rows and 12 columns.        > Finished chain.    'There are 891 rows and 12 columns.'agent.run("How many people are in pclass 1?")            > Entering new  chain...      0%|          |   0.00/100 [00:00<?, ?it/s]    Thought: I need to count the number of people in pclass 1    Action: python_repl_ast    Action Input: data[data['Pclass'] == 1].shape[0]    Observation: 216    Thought: I now know the final
This notebook shows how to use agents to interact with Xorbits Pandas dataframe and Xorbits Numpy ndarray. It is mostly optimized for question answering.
This notebook shows how to use agents to interact with Xorbits Pandas dataframe and Xorbits Numpy ndarray. It is mostly optimized for question answering. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsAINetworkAirbyte Question AnsweringAmadeusAzure Cognitive ServicesClickUp Langchain ToolkitCSVDocument ComparisonGithubGitlabGmailGoogle Drive toolJiraJSONMultiOnOffice365OpenAPINatural Language APIsPandas DataframePlayWright BrowserPowerBI DatasetPythonSpark DataframeSpark SQLSQL DatabaseVectorstoreXorbitsMemoryCallbacksChat loadersComponentsAgents and toolkitsXorbitsOn this pageXorbitsThis notebook shows how to use agents to interact with Xorbits Pandas dataframe and Xorbits Numpy ndarray. It is mostly optimized for question answering.NOTE: this agent calls the Python agent under the hood, which executes LLM generated Python code - this can be bad if the LLM generated Python code is harmful. Use cautiously.Pandas examples‚Äãimport xorbits.pandas as pdfrom langchain.agents import create_xorbits_agentfrom langchain.llms import OpenAIdata = pd.read_csv("titanic.csv")agent = create_xorbits_agent(OpenAI(temperature=0), data, verbose=True)      0%|          |   0.00/100 [00:00<?, ?it/s]agent.run("How many rows and columns are there?")            > Entering new  chain...    Thought: I need to count the number of rows and columns    Action: python_repl_ast    Action Input: data.shape    Observation: (891, 12)    Thought: I now know the final answer    Final Answer: There are 891 rows and 12 columns.        > Finished chain.    'There are 891 rows and 12 columns.'agent.run("How many people are in pclass 1?")            > Entering new  chain...      0%|          |   0.00/100 [00:00<?, ?it/s]    Thought: I need to count the number of people in pclass 1    Action: python_repl_ast    Action Input: data[data['Pclass'] == 1].shape[0]    Observation: 216    Thought: I now know the final