Skip to content

drop must be None for OneHotEncoder to utilize handle_unknown = 'ignore' #18072

@melgazar9

Description

@melgazar9

OneHotEncoder does not allow the parameter handle_unknown = 'ignore' and drop = 'if_binary' or drop = 'first' (or drop = anything other than None). It seems reasonable to want to drop the first category in a column since it is redundant, while also ignoring NaNs when transforming new data. Any thoughts here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions