-
Hi, Quick q: can this be set in the script as a setting? Or how would this be enabled using streamlit for example? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
ngmisl
May 20, 2023
Replies: 1 comment
-
import pandas as pd from pandasai import PandasAI from .data.sample_dataframe import dataframe df = pd.DataFrame(dataframe) llm = OpenAI() Output: 20901884461056 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ngmisl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import pandas as pd
from pandasai import PandasAI
from pandasai.llm.openai import OpenAI
from .data.sample_dataframe import dataframe
df = pd.DataFrame(dataframe)
llm = OpenAI()
pandas_ai = PandasAI(llm, verbose=True, conversational=False, enforce_privacy=True)
response = pandas_ai(
df,
"Calculate the sum of the gdp of north american countries",
)
print(response)
Output: 20901884461056