Skip to content

Use scipy.stats.mstats.mode in SimpleImputer when strategy="most_frequent" #14325

@qinhanmin2014

Description

@qinhanmin2014

# scipy.stats.mstats.mode cannot be used because it will no work
# properly if the first element is masked and if its frequency
# is equal to the frequency of the most frequent valid element
# See https://github.com/scipy/scipy/issues/2636

the fix is included in scipy 0.13.0 (see scipy/scipy@66f71a4), we now require scipy >= 0.17.0

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