# Change Column Names of a DataFrame - Previous methods don't work

**URL:** <https://discourse.julialang.org/t/change-column-names-of-a-dataframe-previous-methods-dont-work/48026>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [October 9, 2020, 10:49am UTC](https://discourse.julialang.org/t/change-column-names-of-a-dataframe-previous-methods-dont-work/48026 "2020-10-09T10:49:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [October 9, 2020, 10:59am UTC](https://discourse.julialang.org/t/change-column-names-of-a-dataframe-previous-methods-dont-work/48026/2 "2020-10-09T10:59:54Z")

</div>

```julia
julia> using DataFrames

julia> df=DataFrame(c1=[1,2,3],c2=[3,4,5])
3×2 DataFrame
│ Row │ c1 │ c2 │
│ │ Int64 │ Int64 │
├─────┼───────┼───────┤
│ 1 │ 1 │ 3 │
│ 2 │ 2 │ 4 │
│ 3 │ 3 │ 5 │

julia> rename!(df,:c1 => :a)
3×2 DataFrame
│ Row │ a │ c2 │
│ │ Int64 │ Int64 │
├─────┼───────┼───────┤
│ 1 │ 1 │ 3 │
│ 2 │ 2 │ 4 │
│ 3 │ 3 │ 5 │

```

---

_[View the full topic](https://discourse.julialang.org/t/change-column-names-of-a-dataframe-previous-methods-dont-work/48026)._
