# DataFrame Manipulation

**URL:** <https://discourse.julialang.org/t/dataframe-manipulation/28552>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 9, 2019, 7:03am UTC](https://discourse.julialang.org/t/dataframe-manipulation/28552 "2019-09-09T07:03:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [September 9, 2019, 7:03am UTC](https://discourse.julialang.org/t/dataframe-manipulation/28552/1 "2019-09-09T07:03:11Z")

</div>

I am using some operation on DataFrame and getting the following warning. How am I supposed to change the syntax

```julia
for col in [:A,:B,:D]
    df[(df[col] .=="yy"),col] .="xxxx"
end
 Warning: `getindex(df::DataFrame, col_ind::ColumnIndex)` is deprecated, use `df[!, col_ind]` instead.
│ caller = top-level scope at Fraud_analysis_Julia_Jan19 (1).jl:52 [inlined]
└ @ Core C:\Users\Himanshi\Desktop\Julia\jlfiles\Fraud_analysis_Julia_Jan19 (1).jl:52

```

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [September 9, 2019, 7:25am UTC](https://discourse.julialang.org/t/dataframe-manipulation/28552/2 "2019-09-09T07:25:27Z")

</div>

```julia
for col in [:A,:B,:D]
    df[df[!, col] .=="yy", col] .= "xxxx"
end

```

should do it.

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [September 9, 2019, 7:50am UTC](https://discourse.julialang.org/t/dataframe-manipulation/28552/3 "2019-09-09T07:50:14Z")

</div>

@cormullion: Thanks
