Describe the bug
DropFeatures type hint and documentation says features_to_drop can take str or list as parameter, but instantiation fails when features_to_drop is a string.
To Reproduce
transformer=DropFeatures(features_to_drop="some_string")
Expected behavior
DropFeatures should instantiate successfully and drop the single feature specified by the string name when transform() or fit_transform() is called.
Screenshots
Error message:
ValueError: features_to_drop should be a list with the name of the variablesyou wish to drop from the dataframe.
Additional context
This is a simple fix, I am happy to take care of it. For convenience I would also convert the string to a single-element list when storing the attribute, for consistency.
Describe the bug
DropFeaturestype hint and documentation saysfeatures_to_dropcan takestr or listas parameter, but instantiation fails whenfeatures_to_dropis a string.To Reproduce
transformer=DropFeatures(features_to_drop="some_string")Expected behavior
DropFeaturesshould instantiate successfully and drop the single feature specified by the string name whentransform()orfit_transform()is called.Screenshots
Error message:
ValueError: features_to_drop should be a list with the name of the variablesyou wish to drop from the dataframe.Additional context
This is a simple fix, I am happy to take care of it. For convenience I would also convert the string to a single-element list when storing the attribute, for consistency.