You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I don't know if this issue will be solved with the moving of DataFrames to Nullable, but the fact that both (NA == NA) and (NA == 1) (ot whichever other value) return NA instead of the expected boolean value is currently at the root of several problems when querying DataFrames.
It makes extremely tedious filters using loops:
function filter(df,c)
for r in eachrow(df)
if (isna(c) && isna(r:[c])) || ( !isna(r[:c]) && r[:c] == c )
...
and breaks select-like functionalities in DataFramesMeta.jl and Query.jl when NA values are present or requested for..
EDIT: I did read the nice answer of simonster on Stack Overflow.. still in some situations you want to get exactly the NA values or the values that are NOT NA, maybe introducing an operator explicitly for that instead of == that can be used in querying the data ?
The text was updated successfully, but these errors were encountered:
That's a complex issue, but essentially we've decided to keep this behavior because that's the most correct and safest one. See JuliaData/Missings.jl#33 for references about these discussions.
You don't need your own equal function, just use isequal (which might get its own Unicode operator in Base at some point).
Hello, I don't know if this issue will be solved with the moving of
DataFrames
toNullable
, but the fact that both(NA == NA)
and(NA == 1)
(ot whichever other value) returnNA
instead of the expected boolean value is currently at the root of several problems when querying DataFrames.It makes extremely tedious filters using loops:
and breaks select-like functionalities in
DataFramesMeta.jl
andQuery.jl
whenNA
values are present or requested for..EDIT: I did read the nice answer of simonster on Stack Overflow.. still in some situations you want to get exactly the NA values or the values that are NOT NA, maybe introducing an operator explicitly for that instead of == that can be used in querying the data ?
The text was updated successfully, but these errors were encountered: