forked from Sinaptik-AI/pandas-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add parquet example to pandas-ai (Sinaptik-AI#855)
* add the data as parquet format * add parquet example to the examples section * add an example of parquet file * update the structure of parquet read * add parquet * remove parquet dependency * remove specific parquet dependency * update comment line * lint: fix lint in examples --------- Co-authored-by: tanersemenn <0418> Co-authored-by: Gabriele Venturi <[email protected]>
- Loading branch information
1 parent
9a06b02
commit 36f3f23
Showing
7 changed files
with
61 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Example of using PandasAI with a Parquet file.""" | ||
|
||
from pandasai import SmartDataframe | ||
from pandasai.llm import OpenAI | ||
|
||
llm = OpenAI() | ||
|
||
smart_df_read = SmartDataframe( | ||
df="examples/data/Loan payments data.parquet", config={"llm": llm} | ||
) | ||
response = smart_df_read.chat("How many loans are from men and have been paid off?") | ||
print(response) | ||
# Output: 247 loans have been paid off by men. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters