Connectors
PandasAI provides connectors to connect to different data sources.
PandasAI mission is to make data analysis and manipulation more efficient and accessible to everyone. This includes making it easier to connect to data sources and to use them in your data analysis and manipulation workflow.
PandasAI provides a number of connectors that allow you to connect to different data sources. These connectors are designed to be easy to use, even if you are not familiar with the data source or with PandasAI.
To use a connector, you first need to install the required dependencies. You can do this by running the following command:
Have a look at the video of how to use the connectors:
SQL connectors
PandasAI provides connectors for the following SQL databases:
- PostgreSQL
- MySQL
- Generic SQL
- Snowflake
- DataBricks
- GoogleBigQuery
- Yahoo Finance
- Airtable
Additionally, PandasAI provides a generic SQL connector that can be used to connect to any SQL database.
PostgreSQL connector
The PostgreSQL connector allows you to connect to a PostgreSQL database. It is designed to be easy to use, even if you are not familiar with PostgreSQL or with PandasAI.
To use the PostgreSQL connector, you only need to import it into your Python code and pass it to a SmartDataframe
or SmartDatalake
object:
MySQL connector
Similarly to the PostgreSQL connector, the MySQL connector allows you to connect to a MySQL database. It is designed to be easy to use, even if you are not familiar with MySQL or with PandasAI.
To use the MySQL connector, you only need to import it into your Python code and pass it to a SmartDataframe
or SmartDatalake
object:
Sqlite connector
Similarly to the PostgreSQL and MySQL connectors, the Sqlite connector allows you to connect to a local Sqlite database file. It is designed to be easy to use, even if you are not familiar with Sqlite or with PandasAI.
To use the Sqlite connector, you only need to import it into your Python code and pass it to a SmartDataframe
or SmartDatalake
object:
Generic SQL connector
The generic SQL connector allows you to connect to any SQL database that is supported by SQLAlchemy.
To use the generic SQL connector, you only need to import it into your Python code and pass it to a SmartDataframe
or SmartDatalake
object:
Snowflake connector
The Snowflake connector allows you to connect to Snowflake. It is very similar to the SQL connectors, but it is tailored for Snowflake. The usage of this connector in production is subject to a license (check it out). If you plan to use it in production, contact us.
To use the Snowflake connector, you only need to import it into your Python code and pass it to a SmartDataframe
or SmartDatalake
object:
DataBricks connector
The DataBricks connector allows you to connect to Databricks. It is very similar to the SQL connectors, but it is tailored for Databricks. The usage of this connector in production is subject to a license (check it out). If you plan to use it in production, contact us.
To use the DataBricks connector, you only need to import it into your Python code and pass it to a Agent
, SmartDataframe
or SmartDatalake
object:
GoogleBigQuery connector
The GoogleBigQuery connector allows you to connect to GoogleBigQuery datasests. It is very similar to the SQL connectors, but it is tailored for Google BigQuery. The usage of this connector in production is subject to a license (check it out). If you plan to use it in production, contact us.
To use the GoogleBigQuery connector, you only need to import it into your Python code and pass it to a Agent
, SmartDataframe
or SmartDatalake
object:
Yahoo Finance connector
The Yahoo Finance connector allows you to connect to Yahoo Finance, by simply passing the ticker symbol of the stock you want to analyze.
To use the Yahoo Finance connector, you only need to import it into your Python code and pass it to a SmartDataframe
or SmartDatalake
object:
Airtable Connector
The Airtable connector allows you to connect to Airtable Projects Tables, by simply passing the base_id
, token
and table_name
of the table you want to analyze.
To use the Airtable connector, you only need to import it into your Python code and pass it to a Agent
,SmartDataframe
or SmartDatalake
object:
Was this page helpful?