model = XGBClassifier() m = model.fit(X , y) zip_iterator = zip(list(X.columns), m.feature_importances_) feature_dict = dict(zip_iterator) dict( sorted(feature_dict.items(), key=operator.itemgetter(1),reverse=True))