内核似乎已经死亡

时间:2019-02-11 11:52:42

标签: python pandas scikit-learn jupyter-notebook conda

运行此代码后,我遇到了Kernel Restarting问题,不知道可能是什么问题:

df.columns = df.columns.str.replace(' ', '_')

df.fillna(value = {'Unnamed:12': 0, 
                   'Unnamed:13': 0,
                   'Unnamed:14': 0}, inplace = True)

# X[:, 1:3] = imputer.transform(X[:, 1:3])
X = df.iloc[:, 1:12].values
y = df.iloc[:, 1].values

#encoding categorical data into dummy

#encoding independante var
labelencoder_X = LabelEncoder()
X[:, 10] = labelencoder_X.fit_transform(X[:, 10]) #dummy quantity
onehotencoder = OneHotEncoder(categorical_features = [10])
X = onehotencoder.fit_transform(X).toarray()
#etc for each dummy

#encoding dependant var
labelencoder_y = LabelEncoder()
y = labelencoder_y.fit_transform(y)

然后我看到带有此错误消息的窗口:

Kernel Restarting
The kernel appears to have died. It will restart automatically.

我看到了另一个类似的问题,并尝试从中解决问题:

Jupyter | The kernel appears to have died. It will restart automatically |

  • conda update mkl-没有帮助
  • conda install numpy-也不帮忙
  • RAM使用6.3/16 Gb

我也阅读了本主题,但没有解决方法:

  1. https://github.com/jupyter/notebook/issues/2784
  2. https://github.com/tensorflow/tensorflow/issues/9829
  3. https://www.kaggle.com/product-feedback/41221

奇怪的是,我对另一个数据集进行了相同的转换,一切都很好。

0 个答案:

没有答案