Question: I'm trying to do a scatter plot matrix in python, this is the code I have: import seaborn as sns df_scatter = df._get_numeric_data() df_concise =

I'm trying to do a scatter plot matrix in python, this is the code I have:

import seaborn as sns df_scatter = df._get_numeric_data()

df_concise = df_scatter[['mpg','cylinders','displacement','horsepower','weight','acceleration','year']] sns.pairplot(df_concise, hue='origin', markers=['+','o','-'])

Whenever I try to run it gives out this error:

KeyError: 'origin'

Any idea on what I'm doing wrong?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!