# Error when using 'All' in 'DataFrames.combine'

**URL:** <https://discourse.julialang.org/t/error-when-using-all-in-dataframes-combine/49045>\
**Category:** Data\
**Tags:** dataframes\
**Created:** [October 26, 2020, 1:33pm UTC](https://discourse.julialang.org/t/error-when-using-all-in-dataframes-combine/49045 "2020-10-26T13:33:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![metab0t](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/metab0t/32/15551_2.png) [@metab0t](https://discourse.julialang.org/u/metab0t)\
**Post date:** [October 26, 2020, 1:33pm UTC](https://discourse.julialang.org/t/error-when-using-all-in-dataframes-combine/49045/1 "2020-10-26T13:33:57Z")

</div>

I try the following code:

```julia
using DataFrames
df = DataFrame(a=1:3, b=4:6)
combine(df, All(:) .=> sum)

```

and get error:

```julia
ERROR: MethodError: no method matching length(::All{Tuple{Colon}})
Closest candidates are:
  length(::DataFrames.RowIndexMap) at C:\Users\meta\.julia\packages\DataFrames\GtZ1l\src\abstractdataframe\join.jl:62
  length(::CompositeException) at task.jl:41
  length(::LibGit2.GitBlob) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\LibGit2\src\blob.jl:3
  ...
Stacktrace:
 [1] _similar_for(::UnitRange{Int64}, ::Type{Any}, ::All{Tuple{Colon}}, ::Base.HasLength) at .\array.jl:597
 [2] _collect(::UnitRange{Int64}, ::All{Tuple{Colon}}, ::Base.HasEltype, ::Base.HasLength) at .\array.jl:630
 [3] collect(::All{Tuple{Colon}}) at .\array.jl:624
 [4] broadcastable(::All{Tuple{Colon}}) at .\broadcast.jl:682
 [5] broadcasted(::Type{T} where T, ::All{Tuple{Colon}}, ::Function) at .\broadcast.jl:1260
 [6] top-level scope at REPL[6]:1

```

Is `All` usable with `combine` function?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [October 26, 2020, 1:34pm UTC](https://discourse.julialang.org/t/error-when-using-all-in-dataframes-combine/49045/2 "2020-10-26T13:34:59Z")

</div>

The problem is that `All()` isn’t broadcastable.

You want `names(df, All()) .=> mean`.

This is something that will be fixed eventually, probably, but hasn’t been done yet.

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [December 13, 2020, 3:47pm UTC](https://discourse.julialang.org/t/error-when-using-all-in-dataframes-combine/49045/4 "2020-12-13T15:47:53Z")

</div>

or just `names(df) .=> mean` in this case. As @pdeffebach noted this will be added, but it is not a top priority (i.e. if someone wants to implement it we will gladly review the PR but the core development effort is currently concentrated on other areas of the package).
