n_samples, n_features = X.shape
if self.categories in [None, "auto"]:
self._label_encoders_ = [LabelEncoder() for _ in range(n_features)]
if self.categories == "most_frequent":
self.categories_ = []
After Change
for i in range(n_features):
Xi = X[:, i]
if self.categories == "auto":
self.categories_.append(np.unique(Xi))
elif self.categories == "most_frequent":
self.categories_.append(self.get_most_frequent(Xi))
else: