# @select all columns in Query.jl

**URL:** <https://discourse.julialang.org/t/select-all-columns-in-query-jl/58448>\
**Category:** General Usage\
**Created:** [April 2, 2021, 2:10pm UTC](https://discourse.julialang.org/t/select-all-columns-in-query-jl/58448 "2021-04-02T14:10:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![drjoke](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drjoke/32/23562_2.png) [@drjoke](https://discourse.julialang.org/u/drjoke)\
**Post date:** [April 2, 2021, 2:10pm UTC](https://discourse.julialang.org/t/select-all-columns-in-query-jl/58448/1 "2021-04-02T14:10:07Z")

</div>

In the following code, how can I @select all columns from a dataframe? Do I have to explicitly list all columns I want to @select?

```julia
x = @from r in DataFramesIO begin
    @where !isnan(r.SHARES)
    @select all
    @collect DataFrame
end

```

---

<div class="post-metadata">

**Author:** ![sswatson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sswatson/32/5135_2.png) [@sswatson](https://discourse.julialang.org/u/sswatson)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://discourse.julialang.org/t/select-all-columns-in-query-jl/58448/2 "2021-04-02T14:39:23Z")

</div>

Just omit the whole line containing the `@select` statement.

---

<div class="post-metadata">

**Author:** ![drjoke](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drjoke/32/23562_2.png) [@drjoke](https://discourse.julialang.org/u/drjoke)\
**Post date:** [April 2, 2021, 2:41pm UTC](https://discourse.julialang.org/t/select-all-columns-in-query-jl/58448/3 "2021-04-02T14:41:21Z")

</div>

Dropping @select would result in the follow error

```julia
LoadError: MethodError: no method matching @from(::LineNumberNode, ::Module, ::Expr)
Closest candidates are:
  @from(::LineNumberNode, ::Module, ::Expr, ::Expr)

```

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [April 2, 2021, 9:24pm UTC](https://discourse.julialang.org/t/select-all-columns-in-query-jl/58448/4 "2021-04-02T21:24:15Z")

</div>

You write it as `@select r`, i.e. the range variable `r` stands for the entire row, and that is what you want to return.

I would also suggest to consider using the standalone query commands with pipes, that is the primary area where I’m adding new features. The LINQ style queries that you are using will never go away, but I don’t expect it to get many new features.

---

<div class="post-metadata">

**Author:** ![sswatson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sswatson/32/5135_2.png) [@sswatson](https://discourse.julialang.org/u/sswatson)\
**Post date:** [April 2, 2021, 9:24pm UTC](https://discourse.julialang.org/t/select-all-columns-in-query-jl/58448/5 "2021-04-02T21:24:24Z")

</div>

Yes, I was thinking of the standalone commands and replied too quickly. You want to do `@select r` here.
