Skip to content

enforce_privacy = True #150

Closed Answered by ngmisl
ngmisl asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ngmisl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant