-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Closed
Labels
BugEasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolvehelp wanted
Milestone
Description
>>> from sklearn.preprocessing import StandardScaler
>>> from sklearn.compose import ColumnTransformer
>>> ColumnTransformer([('foobar', StandardScaler(), [0, 1, 2])]).fit([[1, 2, 3]])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/joel/repos/scikit-learn/sklearn/compose/_column_transformer.py", line 398, in fit
self.fit_transform(X, y=y)
File "/Users/joel/repos/scikit-learn/sklearn/compose/_column_transformer.py", line 422, in fit_transform
self._validate_remainder(X)
File "/Users/joel/repos/scikit-learn/sklearn/compose/_column_transformer.py", line 275, in _validate_remainder
n_columns = X.shape[1]
AttributeError: 'list' object has no attribute 'shape'The passed list should be interpreted as an array for the sake of extracting columns. Instead an error is raised.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugEasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolvehelp wanted