Le samedi 23 mai 2015 à 08:09 -0700, Martin Somers a écrit :
> Was trying something like this earlier
> 
> 
> df[df[:donor] .== "Patient" & df[:pregnant] .== "yes", :]
> 
> 
> 
> but doesnt seem to work is this even possible or am I going to have
> sub divid the operations
> what the what most efficient syntax
You just need to add parentheses like this:
df[(df[:donor] .== "Patient") & (df[:pregnant] .== "yes"), :]

By the way, DataFramesMeta offers convenience macros that you may find
useful for this kind of operations:
https://github.com/JuliaStats/DataFramesMeta.jl


Regards

Reply via email to