问题解决: Pandas and scikit-learn: KeyError: […] not in index

https://stackoverflow.com/questions/51091132/pandas-and-scikit-learn-keyerror-not-in-indexsql   The problem is the way you are trying to index the X using X[train_index]. You need to use .loc or .iloc
相关文章
相关标签/搜索