PandasAI v1.1

PandasAI v1.1
We're thrilled to announce the highly anticipated release of PandasAI v1.1! This new version comes packed with features designed to transform the way you work with dataframes. From enhanced privacy to improved performance, let's dive into the exciting updates that are reshaping the landscape of data manipulation.

Custom Headers

In an age dominated by concerns over data breaches and security issues, the importance of privacy cannot be overstated. Right from its initial releases, PandasAI has been designed with a strong focus on privacy. Notably, sensitive information such as emails, phone numbers, and credit card details has always been redacted, while the remaining data has been shuffled to render it unidentifiable.

Moreover, the introduction of the enforce_privacy parameter led to PandasAI withholding any sample data from being transmitted to the LLM (Language Model), a precautionary measure that had its drawbacks. The absence of sample data meant a reduced information pool for the LLM, resulting in higher chances of it generating erroneous content in certain cases.

This brings us to the launch of a noteworthy feature in PandasAI v1.1—custom headers. Essentially, this update empowers users to employ a pandas dataframe as a customized header. This innovation opens the doors to working with entirely synthetic data, a stride towards a more versatile and privacy-aware approach.

import pandas as pd
from pandasai import SmartDataframe

# Create a pandas dataframe with your custom header
custom_header = ["user_id", "username", "email"]
sample_df = pd.DataFrame(columns=custom_header)

# Create a SmartDataframe instance with the custom header dataframe
df = SmartDataframe(name='users', sample_head=sample_df)

# Now you have a synthetic dataframe with enhanced privacy

Another significant benefit is that using a custom header enables the ability to provide the language model with more contextually relevant examples. This, in turn, could potentially lead to even more enhanced and improved outcomes.

Save and Load Dataframe Configurations

Recognizing the significance of a streamlined workflow, we've implemented a feature that allows you to save and load dataframe configurations. By providing the name, description, and sample header just once, you can subsequently load them swiftly with a single line of code whenever needed.

from pandasai import SmartDataframe

# Create a SmartDataframe instance
df = SmartDataframe(name='users', sample_head=sample_df)

# Save the configuration

# Finally, load the configuration with ease anytime you need it
loaded_df = SmartDataframe.load_config('users')

Getting Started with PandasAI v1.1

Updating to PandasAI v1.1 is as straightforward as ever. Visit our official changelog to learn about the journey from v1.0.11 to v1.1. Elevate your data manipulation game by upgrading to the latest version today!

Thank you for being an integral part of the PandasAI community. With PandasAI v1.1, we're shaping the future of dataframes, one innovation at a time.

Stay connected with us on LinkedIn and Twitter for more updates!