Pandas AI is a Python library that enhances Pandas, a widely used tool for data analysis and manipulation, by incorporating generative artificial intelligence capabilities. It is specifically designed to complement Pandas, rather than serving as a substitute for it.
to install the package, you need to have python 3.9
or higher
pip install pandasai |
PandasAI is specifically designed to work alongside Pandas, providing conversational abilities to the library. It enables you to inquire about your data and receive responses in the form of Pandas DataFrames. As an illustration, you can utilize PandasAI to identify all rows in a DataFrame where a column’s value surpasses 5, and it will yield a DataFrame solely comprising those rows.
import pandas as pd |
the output should be like this:
6 Canada |
another cool feature is to plot:
pandas_ai( |
the result looks like this: