Upload constants.py
Browse files- constants.py +39 -0
constants.py
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
from pandasai.llm.openai import OpenAI
|
3 |
+
from pandasai.llm.starcoder import Starcoder
|
4 |
+
from pandasai.llm.google_palm import GooglePalm
|
5 |
+
|
6 |
+
file_format = {
|
7 |
+
"csv": pd.read_csv,
|
8 |
+
"xls": pd.read_excel,
|
9 |
+
"xlsx": pd.read_excel,
|
10 |
+
"xlsm": pd.read_excel,
|
11 |
+
"xlsb": pd.read_excel,
|
12 |
+
"json": pd.read_json,
|
13 |
+
"html": pd.read_html,
|
14 |
+
"sql": pd.read_sql,
|
15 |
+
"feather": pd.read_feather,
|
16 |
+
"parquet": pd.read_parquet,
|
17 |
+
"dta": pd.read_stata,
|
18 |
+
"sas7bdat": pd.read_sas,
|
19 |
+
"h5": pd.read_hdf,
|
20 |
+
"hdf5": pd.read_hdf,
|
21 |
+
"pkl": pd.read_pickle,
|
22 |
+
"pickle": pd.read_pickle,
|
23 |
+
"gbq": pd.read_gbq,
|
24 |
+
"orc": pd.read_orc,
|
25 |
+
"xpt": pd.read_sas,
|
26 |
+
"sav": pd.read_spss,
|
27 |
+
"gz": pd.read_csv,
|
28 |
+
"zip": pd.read_csv,
|
29 |
+
"bz2": pd.read_csv,
|
30 |
+
"xz": pd.read_csv,
|
31 |
+
"txt": pd.read_csv,
|
32 |
+
"xml": pd.read_xml,
|
33 |
+
}
|
34 |
+
|
35 |
+
models = {
|
36 |
+
"OpenAI": OpenAI,
|
37 |
+
"Starcoder": Starcoder,
|
38 |
+
"Google Palm": GooglePalm
|
39 |
+
}
|