Pandas ai
PandasAIReader #
Bases: BaseReader
Pandas AI reader.
Light wrapper around https://github.com/gventuri/pandas-ai.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
llm |
Optional[llm]
|
LLM to use. Defaults to None. |
required |
concat_rows |
bool
|
whether to concatenate all rows into one document. If set to False, a Document will be created for each row. True by default. |
True
|
col_joiner |
str
|
Separator to use for joining cols per row. Set to ", " by default. |
', '
|
row_joiner |
str
|
Separator to use for joining each row.
Only used when |
'\n'
|
pandas_config |
dict
|
Options for the |
{}
|
Source code in llama-index-integrations/readers/llama-index-readers-pandas-ai/llama_index/readers/pandas_ai/base.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
run_pandas_ai #
run_pandas_ai(initial_df: DataFrame, query: str, is_conversational_answer: bool = False) -> Any
Load dataframe.
Source code in llama-index-integrations/readers/llama-index-readers-pandas-ai/llama_index/readers/pandas_ai/base.py
61 62 63 64 65 66 67 68 69 |
|
load_data #
load_data(initial_df: DataFrame, query: str, is_conversational_answer: bool = False) -> List[Document]
Parse file.
Source code in llama-index-integrations/readers/llama-index-readers-pandas-ai/llama_index/readers/pandas_ai/base.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|