JuliaData / TypedTables.jl

Simple, fast, column-based storage for data analysis in Julia
Other
145 stars 25 forks source link

Error in reproducing filter example from documentation #79

Closed PatMcFarlane closed 3 years ago

PatMcFarlane commented 3 years ago

I'm using Julia 1.6.1 and I got an error when reproducing the example code for the filter functionality:

t = Table(name = ["Alice", "Bob", "Charlie"], age = [25, 42, 37])

Table with 2 columns and 3 rows:
     name     age
   ┌─────────────
 1 │ Alice    25
 2 │ Bob      42
 3 │ Charlie  37

filter(row -> row.age > 40, t)

ERROR: MethodError: objects of type BitVector are not callable
Use square brackets [] for indexing an Array.
Stacktrace:
 [1] top-level scope
andyferris commented 3 years ago

OK - I can't reproduce this. Which version of typed tables are you using? You can get status in pkg> mode by typing ]st at the REPL. The latest release is 1.3.0.

image

andyferris commented 3 years ago

(e.g. if you type ]up does the problem go away?)

PatMcFarlane commented 3 years ago

I'm using tables v1.3.0 and Tables v1.4.4. ]up didn't fix the problem.

But I tried adding the package to my default project environment and then running this code there and it worked just fine. So I went back to my project environment removed the TypedTables package and then added it again and now everything works fine.

Sorry to bother you with this.

andyferris commented 3 years ago

That's fine - I'm glad it worked out in the end.