相关矩阵并没有显示python的所有列

2024-04-26 08:06:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图解决来自Kaggle的“房价”挑战,但我被困在关联矩阵上,因为它根本不能显示我想要的所有列。最初,很明显是因为列数太多,所以我这样做了:

df = df_data[['SalePrice', 'MSSubClass', 'MSZoning', 'LotFrontage', 'LotArea', 'Street', 'Alley', 'LotShape', 'LandContour', 'Utilities']].copy()    

corrmax = df.corr()

f, ax = plt.subplots(figsize=(16,12))
sns.heatmap(corrmax, annot = True)

然后,由于某种原因,得到了只有SalePrice、MSSubClass、LotFrontage和LotArea的热图。谁能帮帮我吗?在


Tags: streetdfdatakaggle列数lotfrontagemssubclasssaleprice