Skip to content

ValueError: Cannot use mean strategy with non-numeric data #6

@MichaelMedek

Description

@MichaelMedek

I have non numeric data, e.g. with categorical text columns as well as numeric columns. But the following line

        self.imputer = SimpleImputer(strategy='mean')
        X = self.imputer.fit_transform(X)

gives the error:

ValueError: Cannot use mean strategy with non-numeric data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions