Следующее описание можно найти в документации OneHotEncoder:
categorical_features : ‘all’ or array of indices or mask, default=’all’
Specify what features are treated as categorical.
‘all’: All features are treated as categorical.
array of indices: Array of categorical feature indices.
mask: Array of length n_features and with dtype=bool.
Таким образом, вместо того, чтобы передавать имя вашего столбца, вы должны передать индекс вашего столбца, и это должно решить вашу проблему.
Кстати, обратите внимание на амортизацию, указанную в документации:
Deprecated since version 0.20: The categorical_features keyword was deprecated in version 0.20 and will be removed in 0.22. You can use the ColumnTransformer instead.