What does the KFold error mean and how to get confusion matrix from Kfold random forest implementation?
modified my code like below, works now

kf = KFold(n_splits=num_folds,random_state=seed,shuffle=False)
kf.get_n_splits(X)
i=1
print("confusion matrix:")
for train_index, test_index in kf.split(X):

    X_train, X_test = X.iloc[train_index,:], X.iloc[test_index,:]
    y_train, y_test = y.iloc[train_index], y.iloc[test_index]

    rfc.fit(X_train, y_train)
    print (i,"\n",confusion_matrix(y_test, rfc.predict(X_test)))
    i=i+1
    print(10* '#')