Correlations of uneven dataframes using python

Viewed 24

i have two dataframes,

df_user;

Name Age Id
A    23   10003
B    34   23443
C    15   10007
D    42   13452

df_car:

  Color  Quantity
  Red    2
  Yellow 4
  Blue   3
  Green  6

Is it possible to create correlations with these two tables? Thank you in advance.

Expected Output:
      Color     Quantity
Name   xx         xx
Age    xx         xx
Id     xx         xx

I tried:

corrmat=df_user.corrwith(df_car)
plt.figure(figsize=(16,16))  
sns.heatmap(corrmat,annot=True,  center=0)

But i get an error.

0 Answers
Related