From the course: Complete Guide to Generative AI for Data Analysis and Data Science

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Visualizing correlations

Visualizing correlations

- [Instructor] I want to look again at a subset of the housing data. Now this time I'm interested in correlation between sale price and price per square feet. So what we have here is some data about selling prices for houses. We don't have date information, and that's fine. I don't need that. But I am going to use ChatGPT to ask it to, "create a python script to generate a visualization to show correlation between the two variables in the following data set." Okay, in this case, once again, ChatGPT is just reminding us if you're running locally, you might need to install pandas matplotlib and seaborn, because those are the libraries we're going to import. And again, pandas is for dataframes. Matplotlib and Seaborn are both visualization tools. So we go through our standard setup of the data using a dictionary. In this case, we'll have two entries, one for sale price, one for price per square foot. We will create a dataframe from the dictionary, and then we're going to create a plot…

Contents