Python matplot相关图上的错误

Python matplot相关图上的错误,python,matplotlib,google-colaboratory,Python,Matplotlib,Google Colaboratory,我无法使相关矩阵工作 import pandas as pd import matplotlib.pyplot as plt info = pd.read_csv('https://raw.githubusercontent.com/tofighi/MachineLearning/master/datasets/heart.csv'); #Percentage of 0 and 1 percentage = info['chd'].value_counts(normalize=True)

我无法使相关矩阵工作

import pandas as pd
import matplotlib.pyplot as plt

info = pd.read_csv('https://raw.githubusercontent.com/tofighi/MachineLearning/master/datasets/heart.csv');

#Percentage of 0 and 1 
percentage = info['chd'].value_counts(normalize=True)
print(info['chd'].value_counts())
print(percentage)

#Missing values
print('\nNumber of missing values:')
print(info.isnull().sum())

#Categorical Variables
print('\n')
print(info.info())

#Maximum Correlation
f = plt.figure(figsize=(19, 15))
plt.matshow(info.corr(), fignum=f.number)
plt.xticks(range(info.shape[1]), info.columns, fontsize=14, rotation=90)
plt.yticks(range(info.shape[1]), info.columns, fontsize=14)
cb = plt.colorbar()
cb.ax.tick_params(labelsize=14)
plt.title('Correlation Matrix', fontsize=16)
plt.show()
错误

KeyError:(0.0,0.0,'行名称','黑色','中间基线','右侧',4543961435493219500,无,无,72.0,1.2)

我必须重新连接到托管运行时,这似乎解决了问题。除了ram/磁盘之外,还有一个下拉菜单,您可以在其中单击以连接到托管运行时。

我必须重新连接到托管运行时,这似乎解决了问题。除了ram/磁盘之外,还有一个下拉菜单,您可以在其中单击以连接到托管运行时。

在我的system@bigbounty我正在使用谷歌COLAB,代码在我的系统中运行良好system@bigbounty我正在使用谷歌colab
KeyError: (0.0, 0.0, 'row.names', 'black', 'center_baseline', 'right', 4543961435493219500, None, None, 72.0, <weakref at 0x7f25554ca548; dead>, 1.2)