I am dropping rows containing missing values from a dataframe.
In 122607 rows, 29 rows contain at least one missing value. I can confirm this 2 ways. First, I wrote a function that counts rows containing 1 or more missing values. Second, using Julia functions, I can do:
dfnew = dropmissing(df)
dfnew has 29 fewer rows than df.
But, dropmissing! reports this error:
ERROR: MethodError: no method matching deleteat!(::PooledArrays.PooledArray{String,UInt32,1,Array{UInt32,1}}, ::Array{Int64,1})
A mystery to me. I guess I won’t use dropmissing!.
I suspect this is intended - I’ve seen a similar error with filter! recently when I load DataFrames without the new copycols=true key word argument. iiuc bunch of mutating functions now their errors to prevent unintended manipulation of the underlying vectors. You used to see things like this, which thankfully doesn’t happen anymore. This is at the expense of needing to explicitly copy columns, which I think is the right design.
One thing that might be useful is a more helpful error message in cases like this. It took me a while to figure out what was happening. Not sure how to catch situations like this though.