Decision Tree gives 100% accuracy - what am I doing wrong? My assumption is that my training set includes the test set, but I don't know how to change this.

from sklearn.model_selection import train_test_split
import sklearn.metrics as metrics

# dataframe to store model performances
scores=pd.DataFrame([],columns=['model', 'recall', 'f1', 'accuracy'])
from sklearn.tree import DecisionTreeClassifier

cv_scores_ac=[]
cv_scores_f1=[]    
cv_scores_re=[]            
for cv in range(1, 6):
    print ("Decision Tree - Iteration %i" % cv)
    X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=cv)

    tree=DecisionTreeClassifier(min_samples_split=20)
    tree.fit(X_train, y_train)
    y_pred=tree.predict(X_test)
    cv_scores_ac.append(metrics.accuracy_score(y_test, y_pred))
    cv_scores_f1.append(metrics.f1_score(y_test, y_pred))
    cv_scores_re.append(metrics.recall_score(y_test, y_pred))
Machine Learning is one of the few things where 99% is excellent and
  100% is terrible.


Well, I cannot prove this because I don't have your data, but probably:


the test data is included in the training data.


To check this possibility, here's a hint:

print(X_test[X_test.isin(X_train)])


will print all the rows in X_test that appear in X_train. Can you think what to do with that information? :)

Or


you forgot to remove the target variable y from X.


To check this possibility, simply type:

print(X_train.columns)


and check whether one of the columns matches the name of the target variable.