I have the following function in julia, to read an Arrow file (using Arrow.jl) to read data from disk and process it:
function getmembershipsdays(fromId, toId)
memberships = Arrow.Table("HouseholdMemberships.arrow") |> DataFrame
filter!([:IndividualId] => id -> id >= fromId && id <= toId, memberships)
...
end
> Error: ERROR: LoadError: MethodError: no method matching
> deleteat!(::Arrow.Primitive{Int64,Array{Int64,1}}, ::Array{Int64,1})
The DataFrame has the following structure:
123226x10 DataFrame
Row | MembershipId | IndividualId | HouseholdId | ...
| Int64 | Int64 | Int64 |
The rest of the code in the function to step through the Dataframe works, but I get this error if I add the filter condition. It is as if the Dataframe columns are not converted to the underlying julia types.
if I do
m = filter([:IndividualId] => id -> id >= fromId && id <= toId, memberships)
then it works. How do I filter in place?