Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,6 @@ You can find the full documentation for PandasAI [here](https://pandas-ai.readth

You can either decide to use PandasAI in your Jupyter notebooks, Streamlit apps, or use the client and server architecture from the repo.

## ☁️ Using the platform

The library can be used alongside our powerful data platform, making end-to-end conversational data analytics possible with as little as a few lines of code.

Load your data, save them as a dataframe, and push them to the platform

```python
import pandasai as pai

pai.api_key.set("your-pai-api-key")

file = pai.read_csv("./filepath.csv")

dataset = pai.create(path="your-organization/dataset-name",
df=file,
name="dataset-name",
description="dataset-description")

dataset.push()
```

Your team can now access and query this data using natural language through the platform.

![PandasAI](assets/demo.gif)

## 📚 Using the library

### Python Requirements
Expand Down
25 changes: 14 additions & 11 deletions docs/v3/ai-dashboards.mdx
Original file line number Diff line number Diff line change
@@ -1,60 +1,63 @@
---
title: 'AI Dashboards'
description: 'Turn your dataframes into collaborative AI dashboards'
title: "AI Dashboards"
description: "Turn your dataframes into collaborative AI dashboards"
---

<Note title="Beta Notice">
Release v3 is currently in beta. This documentation reflects the features and functionality in progress and may change before the final release.
Release v3 is currently in beta. This documentation reflects the features and
functionality in progress and may change before the final release.
</Note>

PandasAI provides a [data platform](https://app.pandabi.ai) that maximizes the power of your [semantic dataframes](/v3/semantic-layer).
PandasAI provides a [data platform](https://app.pandabi.ai) that maximizes the power of your [semantic dataframes](/v3/semantic-layer).
With a single line of code, you can turn your dataframes into auto-updating AI dashboards - no UI development needed.
Each dashboard comes with a pre-generated set of insights and a conversational agent that helps you and your team explore the data through natural language.

```python
import pandasai as pai

df = pai.load("company/heart-data")
df.push()
```

The pushed datasets can then be accessed by your team-mates that can use natural language to ask questions about the data.
[![PandasAI](../assets/demo.gif)](https://app.pandabi.ai)

## Auto-generated Dashboards

For each materialized dataframe, the platform automatically:

- Generates relevant questions about your data
- Creates insightful charts and visualizations
- Provides a pre-built dashboard with key insights
- Includes a conversational agent for dynamic analysis

## Conversational Data Analysis

The platform provides a powerful chat interface where your team can interact with your data using natural language.
The platform provides a powerful chat interface where your team can interact with your data using natural language.
The conversational agent uses your [semantic layer](/v3/semantic-layer) definitions to understand business context and maintain consistency across analyses.

When you ask questions, PandasAI:

1. Uses AI to generate precise code snippets for your analysis
2. Executes the code securely within the platform
3. Returns visualizations and insights from the results

Your data never leaves the platform - the AI only generates code, while all data processing happens in your secure environment.

Ask any question about your data and:

- Get instant answers with explanatory visualizations
- Save insights as new dashboard cards

## Dynamic Analysis

Your dashboards and conversational agent stay continuously synchronized with your data sources through code execution:

- Each insight is powered by auto-generated code snippets
- Code runs on live data, ensuring results are always current
- Inherits all data cleaning and transformations defined in your [semantic layer](/v3/semantic-layer)

## Who should use the Data Platform?

Whether you're a data scientist sharing analysis with stakeholders, a business analyst creating reports, or a team leader fostering data-driven decisions, the platform makes it easy to collaborate on data analysis through our [sharing capabilities](/v3/share-dataframes).

## How to get the Data Platform?
Visit [app.pandabi.ai](https://app.pandabi.ai) to get started.
The data platform is available as a Cloud SaaS or as an enterprise solution that can be deployed on your own cloud infrastructure with full privacy and security controls.

Visit [app.pandabi.ai](https://app.pandabi.ai) to get started.
The data platform is available as a Cloud SaaS or as an enterprise solution that can be deployed on your own cloud infrastructure with full privacy and security controls.
35 changes: 10 additions & 25 deletions docs/v3/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ description: "Learn how to use PandasAI's command-line interface"
---

<Note title="Beta Notice">
PandasAI 3.0 is currently in beta. This documentation reflects the latest features and functionality, which may evolve before the final release.
PandasAI 3.0 is currently in beta. This documentation reflects the latest
features and functionality, which may evolve before the final release.
</Note>

PandasAI comes with a command-line interface (CLI) that helps you manage your datasets and authentication.
Expand All @@ -18,6 +19,7 @@ pai login PAI-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

This will:

1. Validate your API key format
2. Store it in your `.env` file
3. Preserve any other environment variables you might have
Expand All @@ -33,47 +35,30 @@ pai dataset create
```

You'll be prompted for:

- Dataset path (organization/dataset)
- Dataset name (optional)
- Description (optional)
- Source configuration (type, connection details, etc.)

### Pushing a Dataset

Push your local dataset to the remote server:

```bash
pai push organization/dataset
```

After pushing, you can access your dataset at: `https://app.pandabi.ai/datasets/organization/dataset`

### Pulling a Dataset

Pull a dataset from the remote server:

```bash
pai pull organization/dataset
```

## Command Reference

| Command | Description |
|---------|-------------|
| `login <api-key>` | Authenticate with your PandaBI API key |
| `dataset create` | Create a new dataset through a guided process |
| `push <path>` | Push a dataset to the remote server |
| `pull <path>` | Pull a dataset from the remote server |
| Command | Description |
| ----------------- | --------------------------------------------- |
| `login <api-key>` | Authenticate with your PandaBI API key |
| `dataset create` | Create a new dataset through a guided process |

## Path Format

Dataset paths should follow the format: `organization/dataset`

Examples:

- `my-org/sales-data`
- `acme-corp/customer-metrics`

Requirements:

- Organization and dataset names must be lowercase
- Only hyphens are allowed as separators
- Both organization and dataset names are required
34 changes: 9 additions & 25 deletions docs/v3/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: 'Quickstart'
description: 'Start building your data preparation layer with PandasAI and chat with your data'
title: "Quickstart"
description: "Start building your data preparation layer with PandasAI and chat with your data"
---

<Note title="Beta Notice">
PandasAI 3.0 is currently in beta. This documentation reflects the latest features and functionality, which may evolve before the final release.
PandasAI 3.0 is currently in beta. This documentation reflects the latest
features and functionality, which may evolve before the final release.
</Note>

<iframe
Expand All @@ -31,7 +32,7 @@ pip install "pandasai>=3.0.0b2"

## Quick setup

In order to use PandasAI, you need a large language model (LLM). While you can use any LLM, for the purpose of this guide, we are using BambooLLM.
In order to use PandasAI, you need a large language model (LLM). While you can use any LLM, for the purpose of this guide, we are using BambooLLM.
You can get your free API key signing up at [app.pandabi.ai](https://app.pandabi.ai), which allows you to both use the data platform and get BambooLLM credits.

First, import PandasAI and set up your API key:
Expand All @@ -43,7 +44,6 @@ import pandasai as pai
pai.api_key.set("YOUR_PANDABI_API_KEY")
```


## Chat with your data

```python
Expand All @@ -58,14 +58,14 @@ print(response)

When you ask a question, PandasAI will use the LLM to generate the answer and output a response.
Depending on your question, it can return different kind of responses:

- string
- dataframe
- chart
- number

Find it more about output data formats [here](/v3/chat-and-output#available-output-formats).


## Creating your first data layer

### 1. Define a data source
Expand Down Expand Up @@ -142,29 +142,13 @@ companies = pai.load("organization/companies")
response = stocks.chat("What is the volatility of the Coca Cola stock?")
response = companies.chat("What is the average revenue by region?")

# Query using multiple datasets
# Query using multiple datasets
result = pai.chat("Compare the revenue between Coca Cola and Apple", stocks, companies)
```

## Sharing and collaboration

Share your data layers with your team:

```python
# Push datasets to the platform
stocks.push()
companies.push()
```

Team members can then access and query the shared datasets through:
- The web interface at [app.pandabi.ai](https://app.pandabi.ai)
- Their own PandasAI code using `pai.load("organization/dataset-name")`

Of course, they will only be able to see the datasets they have access to. You can control access using the [permission management](/v3/permission-management) features.

## Next Steps

- Learn more about [Semantic Layer](/v3/semantic-layer)
- Join our [Discord Community](https://discord.gg/KYKj9F2FRH) for support
{/* - Explore [Advanced Views and Joins](/v3/views) */}
{/*- Check out our [Example Projects](/v3/examples) */}
{/* - Explore [Advanced Views and Joins](/v3/views) */}
{/* - Check out our [Example Projects](/v3/examples) */}
13 changes: 9 additions & 4 deletions docs/v3/overview-nl.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: 'NL Layer'
description: 'Understanding the AI and natural language processing capabilities of PandasAI'
title: "NL Layer"
description: "Understanding the AI and natural language processing capabilities of PandasAI"
---

<Note title="Beta Notice">
Release v3 is currently in beta. This documentation reflects the features and functionality in progress and may change before the final release.
Release v3 is currently in beta. This documentation reflects the features and
functionality in progress and may change before the final release.
</Note>

## How does PandasAI NL Layer work?
Expand All @@ -15,9 +16,9 @@ It then instructs the LLM to generate the most relevant code, whether Python or
There are different output formats supported by PandasAI, which can be found [here](/v3/chat-and-output#available-output-formats).

The NL Layer is also one of the core components of our [Data Platform](/v3/ai-dashboards), which allows you to turn raw data into collaborative AI dashboards with in-built conversational agents with a single line of code.

```python
df.load("organization/dataset-name")
df.push()
```

## Configure the NL Layer
Expand All @@ -40,19 +41,23 @@ pai.config.set({
### Parameters

#### llm

- **Description**: The LLM to use. You can pass an instance of an LLM or the name of an LLM. See [supported LLMs](/v3/large-language-models) for setup instructions and configuration options.

#### save_logs

- **Type**: `bool`
- **Default**: `True`
- **Description**: Whether to save the logs of the LLM. You will find the logs in the `pandasai.log` file in the root of your project.

#### verbose

- **Type**: `bool`
- **Default**: `False`
- **Description**: Whether to print the logs in the console as PandasAI is executed.

#### max_retries

- **Type**: `int`
- **Default**: `3`
- **Description**: The maximum number of retries to use when using the error correction framework. You can use this setting to override the default number of retries.
34 changes: 11 additions & 23 deletions docs/v3/share-dataframes.mdx
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
---
title: 'Share Dataframes'
description: 'Learn how to push and pull dataframes to/from the PandasAI Data Platform'
title: "Share Dataframes"
description: "Learn how to access and share dataframes using the PandasAI Data Platform"
---

<Note title="Beta Notice">
Release v3 is currently in beta. This documentation reflects the features and functionality in progress and may change before the final release.
Release v3 is currently in beta. This documentation reflects the features and
functionality in progress and may change before the final release.
</Note>

## Pushing Dataframes
Once you have turned raw data into dataframes using the [semantic layer](/v3/semantic-layer), you can push them to our data platform with one line of code.
## Sharing Dataframes

Dataframes can be shared through the PandasAI Data Platform at [app.pandabi.ai](https://app.pandabi.ai). Once you've created your dataframes using the [semantic layer](/v3/semantic-layer), you can upload and manage them through the platform interface.

```python
import pandasai as pai
The platform provides a collaborative environment where:

df_customers = pai.load("company/heart-data")
- Team members can access shared dataframes
- Business users can chat with your data using natural language
- Permissions can be managed centrally

df.push()
```
When you push a dataframe to the platform, business users and team mates can chat with your data using natural language.
![PandasAI](../assets/demo.gif)

## Pulling Dataframes

You can pull dataframes your team-mates have pushed to the platform by combining the load and pull methods.


```python

df_customers = pai.load("company/heart-data")
df_customers = pai.pull()
```
![PandasAI](../assets/demo.gif)
Loading
Loading