Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

declaremissings doesn't replace values of a different (but convertable) type #127

Closed
awadell1 opened this issue May 18, 2022 · 0 comments
Closed

Comments

@awadell1
Copy link

MWE

julia> using Impute
julia> using CSV # For FixedWidth Strings
julia> Impute.declaremissings(String31["Unknown", "adaf"]; values=("Unknown"))
2-element Vector{Union{Missing, String31}}:
 "Unknown"
 "adaf"

Desired output:

2-element Vector{Union{Missing, String}}:
 missing
 "adaf"

I think the root cause is apply!(..., ::DeclareMissings only replacing values with matching type. As !(String31 <: String) nothing gets replaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant