OneHotEncoder(handle_unknown="ignore")
# as it is code
x_train, x_test, y_train, y_test = train_test_split(x,y, test_size=0.25, random_state=42)