File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -474,13 +474,17 @@ def _legacy_fit_transform(self, X):
474
474
def fit_transform (self , X , y = None ):
475
475
"""Fit OneHotEncoder to X, then transform X.
476
476
477
- Equivalent to self.fit(X).transform(X), but more convenient and more
478
- efficient. See fit for the parameters, transform for the return value.
477
+ Equivalent to fit(X).transform(X) but more convenient.
479
478
480
479
Parameters
481
480
----------
482
- X : array-like, shape [n_samples, n_feature]
483
- Input array of type int.
481
+ X : array-like, shape [n_samples, n_features]
482
+ The data to encode.
483
+
484
+ Returns
485
+ -------
486
+ X_out : sparse matrix if sparse=True else a 2-d array
487
+ Transformed input.
484
488
"""
485
489
if self .handle_unknown not in ('error' , 'ignore' ):
486
490
msg = ("handle_unknown should be either 'error' or 'ignore', "
You can’t perform that action at this time.
0 commit comments