analytic / constants.py
RKP64's picture
Upload constants.py
c7e9e1c
raw
history blame
934 Bytes
import pandas as pd
from pandasai.llm.openai import OpenAI
from pandasai.llm.starcoder import Starcoder
from pandasai.llm.google_palm import GooglePalm
file_format = {
"csv": pd.read_csv,
"xls": pd.read_excel,
"xlsx": pd.read_excel,
"xlsm": pd.read_excel,
"xlsb": pd.read_excel,
"json": pd.read_json,
"html": pd.read_html,
"sql": pd.read_sql,
"feather": pd.read_feather,
"parquet": pd.read_parquet,
"dta": pd.read_stata,
"sas7bdat": pd.read_sas,
"h5": pd.read_hdf,
"hdf5": pd.read_hdf,
"pkl": pd.read_pickle,
"pickle": pd.read_pickle,
"gbq": pd.read_gbq,
"orc": pd.read_orc,
"xpt": pd.read_sas,
"sav": pd.read_spss,
"gz": pd.read_csv,
"zip": pd.read_csv,
"bz2": pd.read_csv,
"xz": pd.read_csv,
"txt": pd.read_csv,
"xml": pd.read_xml,
}
models = {
"OpenAI": OpenAI,
"Starcoder": Starcoder,
"Google Palm": GooglePalm
}