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
As you can see, df2 does not have any rows with race == 3. But the frequency table reports the entry with zero value. skipmissing option does not affect the output at all.
The text was updated successfully, but these errors were encountered:
The following code explains the problem:
using DataFrames, CategoricalArrays, FreqTables
df = DataFrame(id = 1:9, race = repeat(collect(1:3),3))
df.race = categorical(df.race)
freqtable(df,:race)
3-element Named Vector{Int64}
race │
──────┼──
1 │ 3
2 │ 3
3 │ 0
df2 = filter( x -> x.race != 3, df)
freqtable(df2, :race, skipmissing = true)
3-element Named Vector{Int64}
race │
──────┼──
1 │ 3
2 │ 3
3 │ 0
As you can see, df2 does not have any rows with race == 3. But the frequency table reports the entry with zero value.
skipmissing
option does not affect the output at all.The text was updated successfully, but these errors were encountered: