Skip to content

Commit

Permalink
Update getting-started.md (#294)
Browse files Browse the repository at this point in the history
replace `run` call
  • Loading branch information
sandiemann committed Jun 18, 2023
1 parent 88ef8db commit 0cfdbd8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ from pandasai.llm.openai import OpenAI
llm = OpenAI(api_token="YOUR_API_TOKEN")

pandas_ai = PandasAI(llm)
pandas_ai.run(df, prompt='Which are the 5 happiest countries?')
pandas_ai(df, prompt='Which are the 5 happiest countries?')
```

## Generate openai API Token
Expand Down Expand Up @@ -82,7 +82,7 @@ df = pd.read_csv("data/Loan payments data.csv")

llm = OpenAI()
pandas_ai = PandasAI(llm, verbose=True, conversational=True)
response = pandas_ai.run(df, "How many loans are from men and have been paid off?")
response = pandas_ai(df, "How many loans are from men and have been paid off?")
print(response)
# Output: 247 loans have been paid off by men.
```
Expand All @@ -102,7 +102,7 @@ df = pd.DataFrame(dataframe)

llm = OpenAI()
pandas_ai = PandasAI(llm, verbose=True)
response = pandas_ai.run(df, "Calculate the sum of the gdp of north american countries")
response = pandas_ai(df, "Calculate the sum of the gdp of north american countries")
print(response)
# Output: 20901884461056

Expand All @@ -123,7 +123,7 @@ df = pd.DataFrame(dataframe)

llm = OpenAI()
pandas_ai = PandasAI(llm)
response = pandas_ai.run(
response = pandas_ai(
df,
"Plot the histogram of countries showing for each the gpd, using different colors for each bar",
)
Expand Down Expand Up @@ -157,7 +157,7 @@ salaries_df = pd.DataFrame(salaries_data)

llm = OpenAI()
pandas_ai = PandasAI(llm, verbose=True)
response = pandas_ai.run(
response = pandas_ai(
[employees_df, salaries_df],
"Who gets paid the most?",
)
Expand Down

0 comments on commit 0cfdbd8

Please sign in to comment.