text_plain_output_1.png
from sklearn.tree import DecisionTreeClassifier, plot_tree

gini_classifier = DecisionTreeClassifier(criterion='gini')

gini_classifier.fit(X_train, y_train)

y_pred = gini_classifier.predict(X_test)

features = list(X_train.columns)
target = list(y_train.unique())

fig, ax = plt.subplots(figsize=(12, 8))
plot_tree(gini_classifier, filled=True, feature_names=features, class_names=target, ax=ax)
plt.show()