Using PandasAI to identify outliers
We can use PandasAI to support some of the work we have done in this chapter to identify outliers. We can check for extreme values based on a univariate analysis. We can look at bivariate and multivariate relationships as well. PandasAI will also help us generate visualizations easily.
Getting ready
You need to install PandasAI to run the code in this recipe. You can do that with pip install pandasai
. We will work with the COVID-19 data again, which is available in the GitHub repository, as well as the code.
You will also need an API key from OpenAI. You can get one at platform.openai.com. You will need to setup an account and then click on your profile in the upper-right corner and then View API keys.
The PandasAI library is improving rapidly, and some things have changed, even since I began writing this book. I have used PandasAI version 2.0.30 in this recipe. It also matters which version of pandas you use with it. I have use...