title: Julia merging dataframes
body: <p>i am rather new to julia so apologies if this is a rather trivial question. However I have stumbled upon a problem i cannot resolve so appreciate any help/suggestions.</p>
  
  <p>I have a function which returns a set of values in a dataframe when I run it. Something along the lines of:</p>
  
  <p><code>(values) = function(data)</code></p>
  
  <p>However I run this function in </p>
  
  <p>[for example see here][1]</p>
  
  <p>I run this function in a loop so that each time it runs, I get a new set of values. </p>
  
  <pre><code>for x = 1:5
      (values) = function(data[data[:sub].==[x], :])
  end
  </code></pre>
  
  <p>After the function runs, I then want to put the values that come back into a "master" data frame which has exactly the same column headings and compiles the values that come back on each loop iteration. </p>
  
  <p>This seems infuriatingly tricky to do. I tried using <code>append!</code> as described here:</p>
  
  <p><a href="https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331/3" rel="nofollow noreferrer">https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331/3</a></p>
  
  <p>But this does not work. For example if I run the following commands</p>
  
  <pre><code>(values_1) = function(data[data[:sub].==[1], :])
  
  (values_2) = function(data[data[:sub].==[2], :])
  
  append(values_1, values_2)
  </code></pre>
  
  <p>This fails with the following error message:</p>
  
  <pre><code>MethodError: no method matching append!(::Array{Float64,2}, ::Array{Float64,2})
  Closest candidates are:
    append!(::PyCall.PyObject, ::Any) at /Users/neil/.julia/v0.5/PyCall/src/PyCall.jl:836
    append!(::Array{T,1}, ::Any) at collections.jl:21
    append!{T}(::PyCall.PyVector{T}, ::Any) at /Users/neil/.julia/v0.5/PyCall/src/conversions.jl:278
  
   in append!(::DataFrames.DataFrame, ::DataFrames.DataFrame) at /Users/neil/.julia/v0.5/DataFrames/src/dataframe/dataframe.jl:791
   in include_string(::String, ::String) at ./loading.jl:441
   in include_string(::String, ::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
  </code></pre>
  
  <p>Note that the function does correctly return a dataframe each time I run it, it is just the concatanation of values that is causing problems.</p>
  
  <p>appreciate any pointers.
  n </p>