# Adding a new row to a DataFrame

**URL:** <https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331>\
**Category:** General Usage\
**Tags:** dataframes\
**Created:** [January 6, 2017, 5:17pm UTC](https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331 "2017-01-06T17:17:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [February 20, 2017, 2:37pm UTC](https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331/4 "2017-02-20T14:37:53Z")

</div>

Another solution using push!() :

```julia
 julia> df = DataFrame(A = 1:4, B = ["M", "F", "F", "M"])
4×2 DataFrames.DataFrame
│ Row │ A │ B │
├─────┼───┼─────┤
│ 1 │ 1 │ "M" │
│ 2 │ 2 │ "F" │
│ 3 │ 3 │ "F" │
│ 4 │ 4 │ "M" │

julia> push!(df,[6 "F"])

julia> df
5×2 DataFrames.DataFrame
│ Row │ A │ B │
├─────┼───┼─────┤
│ 1 │ 1 │ "M" │
│ 2 │ 2 │ "F" │
│ 3 │ 3 │ "F" │
│ 4 │ 4 │ "M" │
│ 5 │ 6 │ "F" │

```

---

_[View the full topic](https://discourse.julialang.org/t/adding-a-new-row-to-a-dataframe/1331)._
