Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7cc82b

Browse filesBrowse files
committed
Fix indentation
1 parent 792a5b6 commit e7cc82b
Copy full SHA for e7cc82b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎sklearn/preprocessing/_encoders.py

Copy file name to clipboardExpand all lines: sklearn/preprocessing/_encoders.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,10 @@ class OneHotEncoder(_BaseEncoder):
353353
One can change the way feature names are created.
354354
355355
>>> def custom_combiner(feature, category):
356-
>>> return str(feature) + "_" + type(category).__name__ + "_" + str(category)
356+
... return str(feature) + "_" + type(category).__name__ + "_" + str(category)
357357
>>> custom_fnames_enc = OneHotEncoder(feature_name_combiner=custom_combiner).fit(X)
358358
>>> custom_fnames_enc.get_feature_names_out()
359-
array(['x0_str_Male', 'x0_str_Female', 'x1_int_1', 'x1_int_3', 'x1_int_2']
359+
array(['x0_str_Female', 'x0_str_Male', 'x1_int_1', 'x1_int_2', 'x1_int_3'])
360360
"""
361361

362362
def __init__(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.