# Can @view be used along with dataframesmeta

**URL:** <https://discourse.julialang.org/t/can-view-be-used-along-with-dataframesmeta/69701>\
**Category:** New to Julia\
**Tags:** data, dataframes\
**Created:** [October 13, 2021, 5:09pm UTC](https://discourse.julialang.org/t/can-view-be-used-along-with-dataframesmeta/69701 "2021-10-13T17:09:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vtomar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vtomar/32/18304_2.png) [@vtomar](https://discourse.julialang.org/u/vtomar)\
**Post date:** [October 13, 2021, 5:09pm UTC](https://discourse.julialang.org/t/can-view-be-used-along-with-dataframesmeta/69701/1 "2021-10-13T17:09:29Z")

</div>

I am trying to update values of a column in a dataframe and I see that I can use @view macro to reference the dataframe. Is there a way to use @view from dataframes and @subset from dataframesmeta to update a column value.

```julia
using DataFrames, DataFramesMeta
test = DataFrame(x = [1,2,3,4], y = [5,6,7,8])
@view test[2:3, :]

```

Suppose I want to update 2nd and 3rd row values of x column, how would I do it using dataframesmeta but at the same time take advantage of referencing the original dataframe (like @view does).

---

<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 13, 2021, 7:45pm UTC](https://discourse.julialang.org/t/can-view-be-used-along-with-dataframesmeta/69701/2 "2021-10-13T19:45:02Z")

</div>

No. That is not yet possible.

`DataFrames.subset` provides a `view = true` keyword argument. But DataFramesMeta.jl macros do not yet support keyword arguments.

DataFrames.jl only very recently added `transform!` to do what you want an act on views. We have not yet added a fully-featured API DataFramesMeta.jl. In the meantime you could get on the latest version of DataFrames.jl and do something like

```julia
@chain df begin 
    view(2:3, :)
    @transform! :y = f(:x)
end

```

and see if that works.
